From 410e6cccd38f176e9df34e5565d04f6f96c7e815 Mon Sep 17 00:00:00 2001 From: markus schnalke Date: Wed, 31 Oct 2018 11:32:39 +0100 Subject: [PATCH] Add test for empty sequence patch by c_14 i.e. for commit 850190587ff71010fc63e44ca01a93a44c96f58e --- test/tests/new/test-empty-seq | 44 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 test/tests/new/test-empty-seq diff --git a/test/tests/new/test-empty-seq b/test/tests/new/test-empty-seq new file mode 100644 index 0000000..f134f27 --- /dev/null +++ b/test/tests/new/test-empty-seq @@ -0,0 +1,44 @@ +#!/bin/sh + +# TODO: Move to a common file tests can source; need more framework... +failed=0 +check() { + diff -u $expected $actual + if [ $? -ne 0 ]; then + failed=$((failed + 1)) + fi +} + +folders=$MH_TEST_DIR/Mail/.folders + +expected=$MH_TEST_DIR/$$.expected +actual=$MH_TEST_DIR/$$.actual + +# make second folder +cp -r $MH_TEST_DIR/Mail/inbox $MH_TEST_DIR/Mail/foo1 +cp -r $MH_TEST_DIR/Mail/inbox $MH_TEST_DIR/Mail/foo2 +# but only list inbox and foo2 in .folders, and sorted differently +cat > $folders <>"$MH_TEST_DIR/Mail/foo2/.mh_sequences" + +# test with the empty sequence +cat > $expected < $actual 2>&1 +check +new -folders $folders empty > $actual 2>&1 +check + +# test fnext/fprev with the empty sequence +> $expected +fnext empty > $actual 2>&1 +check +fprev empty > $actual 2>&1 +check + -- 1.7.10.4