]> diplodocus.org Git - nmh/blobdiff - test/whatnow/test-cd
Checked return value of write() calls in mhfixmsg.c,
[nmh] / test / whatnow / test-cd
index bfa6f4ee4d560e88713ff181e74e1389d69601fe..8b01ab6c1d3e107e5323832e88481c88e180d170 100755 (executable)
@@ -17,6 +17,9 @@ fi
 
 setup_test
 
+# Set TERM to get consistent output.
+TERM=dumb; export TERM
+
 SPDIR="$MH_TEST_DIR/foo's bar"
 rm -rf "$SPDIR"
 mkdir "$SPDIR"
@@ -32,7 +35,7 @@ actual=$MH_TEST_DIR/$$.actual
 #
 
 set +e
-whatnowtest=`echo cd | TERM=dumb run_prog whatnow -prompt ''`
+whatnowtest=`echo cd | whatnow -prompt ''`
 set -e
 
 case ${whatnowtest} in
@@ -58,8 +61,7 @@ EOF
 # ||true to ignore whatnow's exit status
 # watch the quoting -- shell and printf and then the shell run inside whatnow
 printf 'cd %s/foo\\'"'"'s\\ bar\npwd\n' "$MH_TEST_DIR" | \
-  TERM=dumb run_prog whatnow -noedit -prompt '' 2> "$actualerr" > "$actual" || \
-  true
+  run_prog whatnow -noedit -prompt '' 2> "$actualerr" > "$actual" || true
 
 check "$expectederr" "$actualerr"
 check "$expected" "$actual"