[Patch v7 3/6] test: restore with missing final newline
Recent proposed patches for gzipped input had a bug with handling missing newlines that was not caught by the current test suite --- test/T240-dump-restore.sh | 9 + 1 file changed, 9 insertions(+) diff --git a/test/T240-dump-restore.sh b/test/T240-dump-restore.sh index d79aca8..b6d8602 100755 --- a/test/T240-dump-restore.sh +++ b/test/T240-dump-restore.sh @@ -110,6 +110,15 @@ notmuch dump --format=batch-tag from:cworth | sed 's/^.*-- id://' | \ sort > OUTPUT.$test_count test_expect_equal_file EXPECTED.$test_count OUTPUT.$test_count +test_begin_subtest "format=batch-tag, missing newline" +printf "+a_tag_without_newline -- id:20091117232137.GA7669 at griffis1.net" > IN +notmuch restore --accumulate < IN +notmuch dump id:20091117232137.GA7669 at griffis1.net > OUT +cat < EXPECTED ++a_tag_without_newline +inbox +unread -- id:20091117232137.GA7669 at griffis1.net +EOF +test_expect_equal_file EXPECTED OUT + test_begin_subtest "format=batch-tag, # round-trip" notmuch dump --format=sup | sort > EXPECTED.$test_count notmuch dump --format=batch-tag | notmuch restore --format=batch-tag -- 1.9.0
[Patch v7 3/6] test: restore with missing final newline
Recent proposed patches for gzipped input had a bug with handling missing newlines that was not caught by the current test suite --- test/T240-dump-restore.sh | 9 + 1 file changed, 9 insertions(+) diff --git a/test/T240-dump-restore.sh b/test/T240-dump-restore.sh index d79aca8..b6d8602 100755 --- a/test/T240-dump-restore.sh +++ b/test/T240-dump-restore.sh @@ -110,6 +110,15 @@ notmuch dump --format=batch-tag from:cworth | sed 's/^.*-- id://' | \ sort OUTPUT.$test_count test_expect_equal_file EXPECTED.$test_count OUTPUT.$test_count +test_begin_subtest format=batch-tag, missing newline +printf +a_tag_without_newline -- id:20091117232137.ga7...@griffis1.net IN +notmuch restore --accumulate IN +notmuch dump id:20091117232137.ga7...@griffis1.net OUT +cat EOF EXPECTED ++a_tag_without_newline +inbox +unread -- id:20091117232137.ga7...@griffis1.net +EOF +test_expect_equal_file EXPECTED OUT + test_begin_subtest format=batch-tag, # round-trip notmuch dump --format=sup | sort EXPECTED.$test_count notmuch dump --format=batch-tag | notmuch restore --format=batch-tag -- 1.9.0 ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch