sed '/^$/N;/\n$/D'
}
+#### Filter that removes blank lines and leading space that lynx inserts.
+#### but sufficient for our purpose.
+squeeze_whitespace() {
+ sed '/^$/D; s/^ *//;'
+}
+
#### Filter that converts non-breakable space U+00A0 to an ASCII space.
prepare_space() {
sed 's/'"`printf '\\302\\240'`"'/ /g'
# check it
start_test 'text/html part'
- # The sed command removes blank lines and leading space that lynx inserts.
run_prog mhshow -part 1.1.1 -form mhl.null $msgnum |
- sed '/^$/D; s/^ *//;' > $actual 2>&1
+ squeeze_whitespace > $actual 2>&1
check "$expected" "$actual" : part 1.1.1
fi
[ part - text/html - 0B ]
EOF
-run_prog mhshow -noheader -form mhl.null last >"$actual" 2>&1
+run_prog mhshow -noheader -form mhl.null last | squeeze_whitespace >"$actual" 2>&1
check "$expected" "$actual" : malicious parameter value quoting
#