2 ##########################################################
3 # Test incorporating mail from stdin with `inc -file -`. #
4 ##########################################################
7 # Test empty stdin from a pipe.
8 runandcheck "printf '' |inc -file -" <<!
9 Incorporating new mail into inbox...
11 inc: no messages incorporated, continuing...
14 # Test empty stdin from redirected regular file.
17 runandcheck "printf '' >$f && inc -file - <$f" <<!
18 Incorporating new mail into inbox...
20 inc: no messages incorporated, continuing...
25 # Test empty stdin from character device.
26 runandcheck "inc -file - </dev/null" <<!
27 Incorporating new mail into inbox...
29 inc: no messages incorporated, continuing...
33 runandcheck "packf +inbox |inc -file -" <<!
34 Incorporating new mail into inbox...
36 11+ 2006-09-29 00:00 Test1 Testing message 1
37 12 2006-09-29 00:00 Test2 Testing message 2
38 13 2006-09-29 00:00 Test3 Testing message 3
39 14 2006-09-29 00:00 Test4 Testing message 4
40 15 2006-09-29 00:00 Test5 Testing message 5
41 16 2006-09-29 00:00 Test6 Testing message 6
42 17 2006-09-29 00:00 Test7 Testing message 7
43 18 2006-09-29 00:00 Test8 Testing message 8
44 19 2006-09-29 00:00 Test9 Testing message 9
45 20 2006-09-29 00:00 Test10 Testing message 10
48 # Test nonempty redirected stdin.
51 runandcheck "packf +inbox 1-10 >$f && inc -file - <$f" <<!
52 Incorporating new mail into inbox...
54 21+ 2006-09-29 00:00 Test1 Testing message 1
55 22 2006-09-29 00:00 Test2 Testing message 2
56 23 2006-09-29 00:00 Test3 Testing message 3
57 24 2006-09-29 00:00 Test4 Testing message 4
58 25 2006-09-29 00:00 Test5 Testing message 5
59 26 2006-09-29 00:00 Test6 Testing message 6
60 27 2006-09-29 00:00 Test7 Testing message 7
61 28 2006-09-29 00:00 Test8 Testing message 8
62 29 2006-09-29 00:00 Test9 Testing message 9
63 30 2006-09-29 00:00 Test10 Testing message 10
68 runandcheck "folder +inc-testfolder" <<!
69 inc-testfolder+ has no messages
72 runandcheck "inc +inc-testfolder -file - < /dev/null" <<!
73 Incorporating new mail into inc-testfolder...
75 inc: no messages incorporated, continuing...