projects
/
mmh
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added release note that ./@ is obsolete/deprecated.
[mmh]
/
test
/
whatnow
/
test-cd
diff --git
a/test/whatnow/test-cd
b/test/whatnow/test-cd
index
d39d9cf
..
1ff5d96
100755
(executable)
--- a/
test/whatnow/test-cd
+++ b/
test/whatnow/test-cd
@@
-6,22
+6,21
@@
#
######################################################
#
######################################################
+set -e
+
if test -z "${MH_OBJ_DIR}"; then
if test -z "${MH_OBJ_DIR}"; then
- srcdir=`dirname $0`/../..
- MH_OBJ_DIR=`cd $srcdir && pwd`; export MH_OBJ_DIR
+ srcdir=`dirname "$0"`/../..
+ MH_OBJ_DIR=`cd "$srcdir" && pwd`; export MH_OBJ_DIR
fi
. "$MH_OBJ_DIR/test/common.sh"
setup_test
fi
. "$MH_OBJ_DIR/test/common.sh"
setup_test
-set -e
SPDIR="$MH_TEST_DIR/foo's bar"
rm -rf "$SPDIR"
mkdir "$SPDIR"
SPDIR="$MH_TEST_DIR/foo's bar"
rm -rf "$SPDIR"
mkdir "$SPDIR"
-cd "$SPDIR"
-touch baz boz
-cd
+(cd "$SPDIR" && touch baz boz)
expectederr=$MH_TEST_DIR/$$.expectederr
actualerr=$MH_TEST_DIR/$$.actualerr
expectederr=$MH_TEST_DIR/$$.expectederr
actualerr=$MH_TEST_DIR/$$.actualerr
@@
-37,7
+36,12
@@
EOF
# ||true to ignore whatnow's exit status
# watch the quoting -- shell and printf and then the shell run inside whatnow
# ||true to ignore whatnow's exit status
# watch the quoting -- shell and printf and then the shell run inside whatnow
-printf "cd $MH_TEST_DIR/foo\\\\'s\\\\ bar\npwd\n" | whatnow -noedit -prompt '' 2> "$actualerr" > "$actual" || true
+printf "cd $MH_TEST_DIR/foo\\\\'s\\\\ bar\npwd\n" | \
+ whatnow -noedit -prompt '' 2> "$actualerr" > "$actual" || true
+
+check "$expectederr" "$actualerr"
+check "$expected" "$actual"
+
+test ${failed:-0} -eq 0 && rm -r "$SPDIR"
-diff -u $expectederr $actualerr || exit 1
-diff -u $expected $actual
+exit $failed