pick matching rework
[mmh] / test / tests / pick / test-search
1 #!/bin/sh
2 ######################################################
3 #
4 # Test pick -search switch
5 #
6 ######################################################
7
8 . "$MH_TEST_COMMON"
9
10 # Test MIME-encoded header.
11 cat > $(mhpath b) <<!
12 From: Test13 <test13@example.com>
13 To: Some User <user@example.com>
14 Date: Fri, 29 Sep 2006 00:00:00
15 Message-Id: 13@test.nmh
16 Subject: fooo
17
18 This is a test message
19 !
20 lm=$(pick l)
21
22 runandcheck 'pick -search fooo' <<! 2>/dev/null
23 pick: no messages match specification
24 0
25 !
26
27 cat > $(mhpath b) <<!
28 From: Test13 <test13@example.com>
29 To: Some User <user@example.com>
30 Date: Fri, 29 Sep 2006 00:00:00
31 Subject: bla
32
33 This is a test message, with fooo in the body.
34 !
35 lm=$(pick l)
36
37 runandcheck 'pick -search fooo' <<!
38 $lm
39 !