pick matching rework
[mmh] / test / tests / pick / test-case
diff --git a/test/tests/pick/test-case b/test/tests/pick/test-case
new file mode 100644 (file)
index 0000000..fc06ef2
--- /dev/null
@@ -0,0 +1,48 @@
+#!/bin/sh
+######################################################
+#
+# Test that the -thread option works.
+#
+######################################################
+
+. "$MH_TEST_COMMON"
+
+#lower
+cat > `mhpath b` << '!'
+From: alice@example.org
+subject: fooooo
+!
+lower=$(pick l)
+
+#upper
+cat > `mhpath b` << '!'
+From: alice@example.org
+SUBJECT: FOOOOO
+!
+upper=$(pick l)
+
+
+#mixed
+cat > `mhpath b` << '!'
+From: alice@example.org
+sUbJEcT: FOooOo
+!
+mixed=$(pick l)
+
+runandcheck 'pick --subject fooooo' <<!
+$lower
+$upper
+$mixed
+!
+
+runandcheck 'pick --SUBJECT FOOOOO' <<!
+$lower
+$upper
+$mixed
+!
+
+runandcheck 'pick --SuBjeCt foOOoO' <<!
+$lower
+$upper
+$mixed
+!