Rework in the test framework; updated and new tests
[mmh] / test / tests / mhl / test-mhl-flags
1 #!/bin/sh
2 #
3 # Test of various (well, start with one) function escapes.
4
5 . "$MH_TEST_COMMON"
6
7 test_skip "not implemented yet"
8
9
10 cat >`mhpath b` <<EOF
11 MIME-Version: 1.0
12 From: sender@example.com
13 To: recipient@example.com
14 Subject: message with blank lines and trailing spaces
15 Date: Mon, 29 Apr 2013 11:51:45 -0400
16
17 There are two blank lines below.  And there is a trailing space: 
18 And another trailing space: 
19
20
21 EOF
22
23
24 # check nortrim (default), and that trailing whitespace in a
25 # component is trimmed when filtering blank lines
26
27 cat >"$MH_TEST_DIR/test.format" <<EOF
28 body:component="> "
29 EOF
30
31 runandcheck "mhl -form $MH_TEST_DIR/test.format `mhpath l`" <<!
32 > There are two blank lines below.  And there is a trailing space: 
33 > And another trailing space: 
34 >
35 >
36 !
37
38
39
40 # check rtrim
41
42 cat >"$MH_TEST_DIR/test.format" <<EOF
43 body:component="> ",rtrim
44 EOF
45
46 runandcheck "mhl -form $MH_TEST_DIR/test.format `mhpath l`" <<!
47 > There are two blank lines below.  And there is a trailing space:
48 > And another trailing space:
49 >
50 >
51 !
52
53
54 rm -f "$MH_TEST_DIR/test.format"
55