From: Ken Hornstein Date: Sat, 24 Mar 2012 03:21:35 +0000 (-0400) Subject: Modify the whatnow tests to deal with different versions of readline; X-Git-Url: http://git.marmaro.de/?a=commitdiff_plain;h=87e2eacc63f1ecc60d58a01921cdcf8b1aa55171;p=mmh Modify the whatnow tests to deal with different versions of readline; some echo the input, some do not. --- diff --git a/test/whatnow/test-attach-detach b/test/whatnow/test-attach-detach index 3ac5f3b..fe5785c 100755 --- a/test/whatnow/test-attach-detach +++ b/test/whatnow/test-attach-detach @@ -32,18 +32,44 @@ actual=$MH_TEST_DIR/$$.actual rm -f $expected $expectederr $actual $actualerr touch $expected $expectederr $actual $actualerr -cat > $expected < "$expected" < "$expected" <> $actualerr >> $actual -echo "alist" | whatnow -attach foo -noedit -prompt '' 2>> $actualerr >> $actual + TERM=dumb whatnow -attach foo -noedit -prompt '' 2>> $actualerr >> $actual +echo "alist" | TERM=dumb whatnow -attach foo -noedit -prompt '' \ + 2>> $actualerr >> $actual echo "detach $testname_quoted" | \ - whatnow -attach foo -noedit -prompt '' 2>> $actualerr >> $actual -echo "alist" | whatnow -attach foo -noedit -prompt '' 2>> $actualerr >> $actual + TERM=dumb whatnow -attach foo -noedit -prompt '' 2>> $actualerr >> $actual +echo "alist" | TERM=dumb whatnow -attach foo -noedit -prompt '' \ + 2>> $actualerr >> $actual set -e check "$expectederr" "$actualerr" diff --git a/test/whatnow/test-cd b/test/whatnow/test-cd index 1ff5d96..f7f7bc9 100755 --- a/test/whatnow/test-cd +++ b/test/whatnow/test-cd @@ -27,9 +27,30 @@ actualerr=$MH_TEST_DIR/$$.actualerr expected=$MH_TEST_DIR/$$.expected actual=$MH_TEST_DIR/$$.actual -cat > $expected < "$expected" < "$expected" < $expectederr < "$actualerr" > "$actual" || true + TERM=dumb whatnow -noedit -prompt '' 2> "$actualerr" > "$actual" || true check "$expectederr" "$actualerr" check "$expected" "$actual" diff --git a/test/whatnow/test-ls b/test/whatnow/test-ls index c289830..9d072fa 100755 --- a/test/whatnow/test-ls +++ b/test/whatnow/test-ls @@ -28,16 +28,38 @@ actualerr=$MH_TEST_DIR/$$.actualerr expected=$MH_TEST_DIR/$$.expected actual=$MH_TEST_DIR/$$.actual -cat > $expected < "$expected" < "$expected" < $expectederr < "$actualerr" | sort > "$actual" +echo 'ls' | TERM=dumb whatnow -noedit -prompt '' 2> "$actualerr" | \ + sort > "$actual" check "$expectederr" "$actualerr" check "$expected" "$actual"