update unseen sequence after display
[mmh] / test / tests / show / test-unseen-update
diff --git a/test/tests/show/test-unseen-update b/test/tests/show/test-unseen-update
new file mode 100644 (file)
index 0000000..a4875c4
--- /dev/null
@@ -0,0 +1,46 @@
+#!/bin/sh
+######################################################
+#
+# Test change of sequence during show
+#
+######################################################
+
+. "$MH_TEST_COMMON"
+
+mark -sequence u -add -nozero 1-9
+show 1-8 | mmh_test_fakepager &
+pagerpid=$!
+
+#because the fakepager sleeps 60 secounds the unseen sequence should be unchainged
+#this can fail if the buffer of the pipe is big enouth to hold all messages
+runandcheck "pick u" <<!
+1
+2
+3
+4
+5
+6
+7
+8
+9
+!
+mark -sequence u -add -nozero 10
+runandcheck "pick u" <<!
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+!
+pkill -P $pagerpid
+wait $pagerpid
+
+runandcheck "pick u" <<!
+9
+10
+!