]> diplodocus.org Git - nmh/blobdiff - test/whatnow/test-attach-detach
Here's a better fix for the whatnow tests: set and export
[nmh] / test / whatnow / test-attach-detach
index 27dcb9cdd6f62b7a9aeb400aac58bcc9c719e558..f7c39e9d6dd40216c994be2655130db88b44973f 100755 (executable)
@@ -17,6 +17,9 @@ fi
 
 setup_test
 
+# Set TERM to get consistent output.
+TERM=dumb; export TERM
+
 cd "$MH_TEST_DIR"
 testname="baz's boz"
 testname_quoted="baz\'s\ boz"
@@ -38,7 +41,7 @@ touch $expected $expectederr $actual $actualerr
 #
 
 set +e
-whatnowtest=`echo cd | TERM=dumb run_prog whatnow -prompt ''`
+whatnowtest=`echo cd | whatnow -prompt ''`
 set -e
 
 case ${whatnowtest} in
@@ -63,14 +66,13 @@ esac
 # whatnow's exit status is always 1 so that is not a failure
 set +e
 echo "attach $testname_quoted" | \
-  TERM=dumb run_prog whatnow -attach foo -noedit -prompt '' 2>> $actualerr \
-    >> $actual
-echo "alist" | TERM=dumb run_prog whatnow -attach foo -noedit -prompt '' \
-                               2>> $actualerr >> $actual
+  run_prog whatnow -attach foo -noedit -prompt '' 2>> $actualerr >> $actual
+echo "alist" | \
+  run_prog whatnow -attach foo -noedit -prompt '' 2>> $actualerr >> $actual
 echo "detach $testname_quoted" | \
-  TERM=dumb whatnow -attach foo -noedit -prompt '' 2>> $actualerr >> $actual
-echo "alist" | TERM=dumb run_prog whatnow -attach foo -noedit -prompt '' \
-                               2>> $actualerr >> $actual
+  run_prog whatnow -attach foo -noedit -prompt '' 2>> $actualerr >> $actual
+echo "alist" | \
+  run_prog whatnow -attach foo -noedit -prompt '' 2>> $actualerr >> $actual
 set -e
 
 check "$expectederr" "$actualerr"