Changeset: 4583aa502d25 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4583aa502d25 Modified Files: common/stream/Tests/read_bz2.stable.out common/stream/Tests/read_gz.stable.out common/stream/Tests/read_lz4.stable.out common/stream/Tests/read_tests.py common/stream/Tests/read_uncompressed.stable.out common/stream/Tests/read_xz.stable.out Branch: Oct2020 Log Message:
Add test for text streams with lone CR's in them Also read in one-byte chunks, to try to trigger some boundary issues diffs (truncated from 370 to 300 lines): diff --git a/common/stream/Tests/read_bz2.stable.out b/common/stream/Tests/read_bz2.stable.out --- a/common/stream/Tests/read_bz2.stable.out +++ b/common/stream/Tests/read_bz2.stable.out @@ -18,6 +18,12 @@ Test: read rstream sherlock_bom.txt.bz2 Test: read rastream sherlock_bom.txt.bz2 OK +Test: read rstream sherlock_cr.txt.bz2 + OK + +Test: read rastream sherlock_cr.txt.bz2 + OK + Test: read rstream empty.txt.bz2 OK @@ -246,6 +252,12 @@ Test: read ['rstream', 'blocksize:2'] sh Test: read ['rastream', 'blocksize:2'] sherlock.txt.bz2 OK +Test: read ['rstream', 'blocksize:1'] sherlock.txt.bz2 + OK + +Test: read ['rastream', 'blocksize:1'] sherlock.txt.bz2 + OK + Test: read ['rstream', 'blocksize:1000000'] sherlock.txt.bz2 OK @@ -258,13 +270,37 @@ Test: read ['rstream', 'blocksize:2'] sh Test: read ['rastream', 'blocksize:2'] sherlock_bom.txt.bz2 OK +Test: read ['rstream', 'blocksize:1'] sherlock_bom.txt.bz2 + OK + +Test: read ['rastream', 'blocksize:1'] sherlock_bom.txt.bz2 + OK + Test: read ['rstream', 'blocksize:1000000'] sherlock_bom.txt.bz2 OK Test: read ['rastream', 'blocksize:1000000'] sherlock_bom.txt.bz2 OK -# 14:27:59 > -# 14:27:59 > "Done." -# 14:27:59 > +Test: read ['rstream', 'blocksize:2'] sherlock_cr.txt.bz2 + OK + +Test: read ['rastream', 'blocksize:2'] sherlock_cr.txt.bz2 + OK + +Test: read ['rstream', 'blocksize:1'] sherlock_cr.txt.bz2 + OK +Test: read ['rastream', 'blocksize:1'] sherlock_cr.txt.bz2 + OK + +Test: read ['rstream', 'blocksize:1000000'] sherlock_cr.txt.bz2 + OK + +Test: read ['rastream', 'blocksize:1000000'] sherlock_cr.txt.bz2 + OK + +# 16:14:34 > +# 16:14:34 > "Done." +# 16:14:34 > + diff --git a/common/stream/Tests/read_gz.stable.out b/common/stream/Tests/read_gz.stable.out --- a/common/stream/Tests/read_gz.stable.out +++ b/common/stream/Tests/read_gz.stable.out @@ -18,6 +18,12 @@ Test: read rstream sherlock_bom.txt.gz Test: read rastream sherlock_bom.txt.gz OK +Test: read rstream sherlock_cr.txt.gz + OK + +Test: read rastream sherlock_cr.txt.gz + OK + Test: read rstream empty.txt.gz OK @@ -246,6 +252,12 @@ Test: read ['rstream', 'blocksize:2'] sh Test: read ['rastream', 'blocksize:2'] sherlock.txt.gz OK +Test: read ['rstream', 'blocksize:1'] sherlock.txt.gz + OK + +Test: read ['rastream', 'blocksize:1'] sherlock.txt.gz + OK + Test: read ['rstream', 'blocksize:1000000'] sherlock.txt.gz OK @@ -258,13 +270,37 @@ Test: read ['rstream', 'blocksize:2'] sh Test: read ['rastream', 'blocksize:2'] sherlock_bom.txt.gz OK +Test: read ['rstream', 'blocksize:1'] sherlock_bom.txt.gz + OK + +Test: read ['rastream', 'blocksize:1'] sherlock_bom.txt.gz + OK + Test: read ['rstream', 'blocksize:1000000'] sherlock_bom.txt.gz OK Test: read ['rastream', 'blocksize:1000000'] sherlock_bom.txt.gz OK -# 14:28:00 > -# 14:28:00 > "Done." -# 14:28:00 > +Test: read ['rstream', 'blocksize:2'] sherlock_cr.txt.gz + OK + +Test: read ['rastream', 'blocksize:2'] sherlock_cr.txt.gz + OK + +Test: read ['rstream', 'blocksize:1'] sherlock_cr.txt.gz + OK +Test: read ['rastream', 'blocksize:1'] sherlock_cr.txt.gz + OK + +Test: read ['rstream', 'blocksize:1000000'] sherlock_cr.txt.gz + OK + +Test: read ['rastream', 'blocksize:1000000'] sherlock_cr.txt.gz + OK + +# 16:14:36 > +# 16:14:36 > "Done." +# 16:14:36 > + diff --git a/common/stream/Tests/read_lz4.stable.out b/common/stream/Tests/read_lz4.stable.out --- a/common/stream/Tests/read_lz4.stable.out +++ b/common/stream/Tests/read_lz4.stable.out @@ -18,6 +18,12 @@ Test: read rstream sherlock_bom.txt.lz4 Test: read rastream sherlock_bom.txt.lz4 OK +Test: read rstream sherlock_cr.txt.lz4 + OK + +Test: read rastream sherlock_cr.txt.lz4 + OK + Test: read rstream empty.txt.lz4 OK @@ -246,6 +252,12 @@ Test: read ['rstream', 'blocksize:2'] sh Test: read ['rastream', 'blocksize:2'] sherlock.txt.lz4 OK +Test: read ['rstream', 'blocksize:1'] sherlock.txt.lz4 + OK + +Test: read ['rastream', 'blocksize:1'] sherlock.txt.lz4 + OK + Test: read ['rstream', 'blocksize:1000000'] sherlock.txt.lz4 OK @@ -258,13 +270,37 @@ Test: read ['rstream', 'blocksize:2'] sh Test: read ['rastream', 'blocksize:2'] sherlock_bom.txt.lz4 OK +Test: read ['rstream', 'blocksize:1'] sherlock_bom.txt.lz4 + OK + +Test: read ['rastream', 'blocksize:1'] sherlock_bom.txt.lz4 + OK + Test: read ['rstream', 'blocksize:1000000'] sherlock_bom.txt.lz4 OK Test: read ['rastream', 'blocksize:1000000'] sherlock_bom.txt.lz4 OK -# 14:28:01 > -# 14:28:01 > "Done." -# 14:28:01 > +Test: read ['rstream', 'blocksize:2'] sherlock_cr.txt.lz4 + OK + +Test: read ['rastream', 'blocksize:2'] sherlock_cr.txt.lz4 + OK + +Test: read ['rstream', 'blocksize:1'] sherlock_cr.txt.lz4 + OK +Test: read ['rastream', 'blocksize:1'] sherlock_cr.txt.lz4 + OK + +Test: read ['rstream', 'blocksize:1000000'] sherlock_cr.txt.lz4 + OK + +Test: read ['rastream', 'blocksize:1000000'] sherlock_cr.txt.lz4 + OK + +# 16:14:39 > +# 16:14:39 > "Done." +# 16:14:39 > + diff --git a/common/stream/Tests/read_tests.py b/common/stream/Tests/read_tests.py --- a/common/stream/Tests/read_tests.py +++ b/common/stream/Tests/read_tests.py @@ -64,6 +64,7 @@ def gen_docs(): # Whole file yield 'sherlock.txt', Doc(text) yield 'sherlock_bom.txt', Doc(text, prepend_bom=True) + yield 'sherlock_cr.txt', Doc(text.replace(b'\n', b'\r')) # Empty file yield 'empty.txt', Doc(b'') @@ -102,6 +103,8 @@ def gen_tests(): continue yield TestCase(name, doc, compr, ["rstream", "blocksize:2"], doc) yield TestCase(name, doc, compr, ["rastream", "blocksize:2"], doc.without_bom().to_unix()) + yield TestCase(name, doc, compr, ["rstream", "blocksize:1"], doc) + yield TestCase(name, doc, compr, ["rastream", "blocksize:1"], doc.without_bom().to_unix()) yield TestCase(name, doc, compr, ["rstream", "blocksize:1000000"], doc) yield TestCase(name, doc, compr, ["rastream", "blocksize:1000000"], doc.without_bom().to_unix()) diff --git a/common/stream/Tests/read_uncompressed.stable.out b/common/stream/Tests/read_uncompressed.stable.out --- a/common/stream/Tests/read_uncompressed.stable.out +++ b/common/stream/Tests/read_uncompressed.stable.out @@ -18,6 +18,12 @@ Test: read rstream sherlock_bom.txt Test: read rastream sherlock_bom.txt OK +Test: read rstream sherlock_cr.txt + OK + +Test: read rastream sherlock_cr.txt + OK + Test: read rstream empty.txt OK @@ -246,6 +252,12 @@ Test: read ['rstream', 'blocksize:2'] sh Test: read ['rastream', 'blocksize:2'] sherlock.txt OK +Test: read ['rstream', 'blocksize:1'] sherlock.txt + OK + +Test: read ['rastream', 'blocksize:1'] sherlock.txt + OK + Test: read ['rstream', 'blocksize:1000000'] sherlock.txt OK @@ -258,13 +270,37 @@ Test: read ['rstream', 'blocksize:2'] sh Test: read ['rastream', 'blocksize:2'] sherlock_bom.txt OK +Test: read ['rstream', 'blocksize:1'] sherlock_bom.txt + OK + +Test: read ['rastream', 'blocksize:1'] sherlock_bom.txt + OK + Test: read ['rstream', 'blocksize:1000000'] sherlock_bom.txt OK Test: read ['rastream', 'blocksize:1000000'] sherlock_bom.txt OK -# 14:27:57 > -# 14:27:57 > "Done." -# 14:27:57 > +Test: read ['rstream', 'blocksize:2'] sherlock_cr.txt + OK + +Test: read ['rastream', 'blocksize:2'] sherlock_cr.txt + OK + +Test: read ['rstream', 'blocksize:1'] sherlock_cr.txt + OK +Test: read ['rastream', 'blocksize:1'] sherlock_cr.txt + OK + +Test: read ['rstream', 'blocksize:1000000'] sherlock_cr.txt + OK + +Test: read ['rastream', 'blocksize:1000000'] sherlock_cr.txt + OK + +# 16:14:31 > +# 16:14:31 > "Done." +# 16:14:31 > + _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list