From d50f41c0fd0bbd2ca2b364f49deaea8be63dff3c Mon Sep 17 00:00:00 2001 From: David Bremner Date: Sun, 12 Apr 2020 14:30:12 -0300 Subject: [PATCH] test: add known_broken test for dumping large stored queries 'qsx' reported a bug on #notmuch with notmuch-dump and large stored queries. This test will pass (on my machine) if the value of `repeat' is made smaller. Reported-By: Thomas Schneider --- test/T600-named-queries.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/test/T600-named-queries.sh b/test/T600-named-queries.sh index abaee3b7..852f7530 100755 --- a/test/T600-named-queries.sh +++ b/test/T600-named-queries.sh @@ -36,6 +36,22 @@ cat< QUERIES.BEFORE EOF test_expect_equal_file QUERIES.BEFORE OUTPUT +test_begin_subtest 'dumping large queries' +test_subtest_known_broken +# This value is just large enough to trigger a limitation of gzprintf +# to 8191 bytes in total (by default). +repeat=1329 +notmuch config set query.big "$(seq -s' ' $repeat)" +notmuch dump --include=config > OUTPUT +notmuch config set query.big '' +printf "#notmuch-dump batch-tag:3 config\n#@ query.big " > EXPECTED +seq -s'%20' $repeat >> EXPECTED +cat <> EXPECTED +#@ query.test date%3a2009-11-18..2009-11-18%20and%20tag%3aunread +#@ query.test2 query%3atest%20and%20subject%3aMaildir +EOF +test_expect_equal_file EXPECTED OUTPUT + test_begin_subtest "delete named queries" notmuch dump > BEFORE notmuch config set query.test