aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorGravatar David Bremner <david@tethera.net>2014-04-03 08:02:23 -0300
committerGravatar David Bremner <david@tethera.net>2014-04-12 07:59:44 -0300
commitde71c4d734bda72eb54b2874935dbd948610ddbe (patch)
treead0d9e084f6a64eba75a46f74d8f50a041cca40d /test
parent85d9219a62c23c3ff58b42a63b65390526b89b6b (diff)
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
Diffstat (limited to 'test')
-rwxr-xr-xtest/T240-dump-restore.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/T240-dump-restore.sh b/test/T240-dump-restore.sh
index d79aca86..b6d86020 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@griffis1.net" > IN
+notmuch restore --accumulate < IN
+notmuch dump id:20091117232137.GA7669@griffis1.net > OUT
+cat <<EOF > EXPECTED
++a_tag_without_newline +inbox +unread -- id:20091117232137.GA7669@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