From 87e2eacc63f1ecc60d58a01921cdcf8b1aa55171 Mon Sep 17 00:00:00 2001 From: Ken Hornstein Date: Fri, 23 Mar 2012 23:21:35 -0400 Subject: [PATCH] Modify the whatnow tests to deal with different versions of readline; some echo the input, some do not. --- test/whatnow/test-attach-detach | 36 +++++++++++++++++++++++++++++++----- test/whatnow/test-cd | 25 +++++++++++++++++++++++-- test/whatnow/test-ls | 26 ++++++++++++++++++++++++-- 3 files changed, 78 insertions(+), 9 deletions(-) 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" -- 1.7.10.4