[PATCH] test: update dump-restore roundtripping test for batch-tag format

david at tethera.net david at tethera.net
Sat Nov 24 17:16:48 PST 2012


From: David Bremner <bremner at debian.org>

Now we can actually round trip these crazy tags and and message ids.
hex-xcode is no longer needed as it's built in.
---


I played with this a bit to try to make the diff nicer; I'm not sure
if I really improved much, but putting the sort into the original test
was a bug fix anyway. This is really for review; I don't think it will
apply without also resending 6/14.

 test/dump-restore |   14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/test/dump-restore b/test/dump-restore
index 28474f5..e9ba79d 100755
--- a/test/dump-restore
+++ b/test/dump-restore
@@ -86,18 +86,16 @@ notmuch dump --output=dump-outfile-dash-inbox.actual -- from:cworth
 test_expect_equal_file dump-cworth.expected dump-outfile-dash-inbox.actual
 
 test_expect_success 'roundtripping random message-ids and tags' \
-    'test_subtest_known_broken &&
-     ${TEST_DIRECTORY}/random-corpus --num-messages=10 \
+     '${TEST_DIRECTORY}/random-corpus --num-messages=100 \
        --config-path=${NOTMUCH_CONFIG} &&
-     notmuch dump |
-       ${TEST_DIRECTORY}/hex-xcode --direction=encode |
+     notmuch dump --format=batch-tag |
        sort > EXPECTED.$test_count &&
      notmuch tag -random-corpus tag:random-corpus &&
-     ${TEST_DIRECTORY}/hex-xcode --direction=decode < EXPECTED.$test_count |
-       notmuch restore 2>/dev/null &&
-     notmuch dump |
-       ${TEST_DIRECTORY}/hex-xcode --direction=encode |
+     notmuch restore --format=batch-tag < EXPECTED.$test_count &&
+     notmuch dump --format=batch-tag |
        sort > OUTPUT.$test_count &&
      test_cmp EXPECTED.$test_count OUTPUT.$test_count'
 
 test_done
+
+# Note the database is "poisoned" for sup format at this point.
-- 
1.7.10.4



More information about the notmuch mailing list