about summary refs log tree commit diff
path: root/t/1800-mexport.t
blob: c0eadbd1c557030f290f64a595454b447b2f6c92 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/sh -e
cd ${0%/*}
. ./lib.sh
plan 2

cat <<EOF >tmp.1
Subject: message 1

This is message 1.
EOF

cat <<EOF >tmp.2
Subject: message 2

This is message 2.  It has a trailing empty line.

EOF

printf >tmp.3 'Subject: message 3

This is message 3.  It has a no trailing newline, oops.'

mexport ./tmp.1 ./tmp.2 ./tmp.3 >./tmp.mbox

check 'generated mbox has 16 lines' 'cat ./tmp.mbox | wc -l | grep 16'
check 'generated mbox has 7 empty lines' 'grep -c "^$" ./tmp.mbox | grep 7'