3 cd "`dirname \"$0\"`" &&
4 MAILCAPS="`pwd`"/.mailcap &&
18 ../mimedecode.py -H test -f utf-8 "$@" input/"$infile" >tmp/"$expfile" || return 1
19 if cmp -s expected/"$expfile" tmp/"$expfile"; then
20 rm tmp/"$expfile" && return 0 || return 1
22 diff --text expected/"$expfile" tmp/"$expfile" >tmp/"$expfile".diff
37 for f in input/*.txt; do
42 test_file msg_03.txt msg_03-1.txt -D -d From,To,Subject
43 test_file msg_03.txt msg_03-1.txt -d '*,-cc'
44 test_file msg_03.txt msg_03-1.txt -d \*,From,To,Subject,-cc
45 test_file msg_15.txt msg_15-1.txt -b text/html
46 test_file msg_15.txt msg_15-2.txt -i text/html
47 test_file msg_22.txt msg_22-1.txt -r content-id
48 test_file msg_29.txt msg_29-1.txt -R Content-Type:title
49 test_file msg_18.txt msg_18-1.txt --remove-params=X-Foobar-Spoink-Defrobnit
51 if [ "$RC" -eq 0 ]; then
52 echo "All tests passed!"