unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH] test: add nontrivial test for restore --accumulate.
@ 2012-11-16 12:31 david
  2012-11-17  1:56 ` Ethan Glasser-Camp
  0 siblings, 1 reply; 7+ messages in thread
From: david @ 2012-11-16 12:31 UTC (permalink / raw)
  To: notmuch; +Cc: David Bremner

From: David Bremner <bremner@debian.org>

It seems we have never tested the case that restore --accumulate
actually adds tags. I noticed this when I started optimizing and no
tests failed.

I also had to modify the next test. Perhaps a seperate patch could
make these tests more independent of the previous ones.
---
 test/dump-restore |   14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/test/dump-restore b/test/dump-restore
index f25f7cf..ca7a730 100755
--- a/test/dump-restore
+++ b/test/dump-restore
@@ -29,18 +29,20 @@ test_expect_success 'Accumulate original tags' \
   notmuch dump > dump.actual &&
   test_cmp dump-ABC_DEF.expected dump.actual'
 
-test_expect_success 'Restoring original tags' \
-  'notmuch restore --input=dump.expected &&
-  notmuch dump > dump.actual &&
-  test_cmp dump.expected dump.actual'
-
 test_expect_success 'Restore with nothing to do' \
   'notmuch restore < dump.expected &&
   notmuch dump > dump.actual &&
   test_cmp dump.expected dump.actual'
 
+test_expect_success 'Accumulate with changes' \
+  'notmuch restore --input=dump.expected &&
+   notmuch restore --accumulate --input=dump-ABC_DEF.expected &&
+  notmuch dump >  OUTPUT.$test_count &&
+  test_cmp dump-ABC_DEF.expected OUTPUT.$test_count'
+
 test_expect_success 'Restore with nothing to do, II' \
-  'notmuch restore --accumulate --input=dump.expected &&
+  'notmuch restore --input=dump.expected &&
+  notmuch restore --accumulate --input=dump.expected &&
   notmuch dump > dump.actual &&
   test_cmp dump.expected dump.actual'
 
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-11-17 23:08 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-16 12:31 [PATCH] test: add nontrivial test for restore --accumulate david
2012-11-17  1:56 ` Ethan Glasser-Camp
2012-11-17 14:30   ` [PATCH 1/2] test: add more informative titles to restore --accumulate tests david
2012-11-17 14:30     ` [PATCH 2/2] test: add nontrivial test for restore --accumulate david
2012-11-17 15:49       ` Ethan Glasser-Camp
2012-11-17 16:40     ` [PATCH 1/2] test: add more informative titles to restore --accumulate tests Tomi Ollila
2012-11-17 22:58       ` David Bremner

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).