X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/fa462ef71fbaf819397c59b2c07adf45a04af9f8..26c2b1ef1709cd7b34fe3e78995768a369e0f116:/test/whatnow/test-cd?ds=inline diff --git a/test/whatnow/test-cd b/test/whatnow/test-cd index bfa6f4ee..8b01ab6c 100755 --- a/test/whatnow/test-cd +++ b/test/whatnow/test-cd @@ -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"