]>
diplodocus.org Git - nmh/blob - test/whatnow/test-ls
2 ######################################################
4 # Test that whatnow's "ls" copes with directory names
5 # which have spaces and quotes in them (see bug #23319)
7 ######################################################
9 if test -z "${MH_OBJ_DIR}"; then
10 srcdir
=`dirname $0`/..
/..
11 MH_OBJ_DIR
=`cd $srcdir && pwd`; export MH_OBJ_DIR
14 .
"$MH_OBJ_DIR/test/common.sh"
19 SPDIR
="$MH_TEST_DIR/foo's bar"
25 expectederr
=$MH_TEST_DIR/$$.expectederr
26 actualerr
=$MH_TEST_DIR/$$.actualerr
27 expected
=$MH_TEST_DIR/$$.expected
28 actual
=$MH_TEST_DIR/$$.actual
35 cat > $expectederr <<EOF
38 # NB use of sort as the order of output of ls is not guaranteed
39 echo 'ls' | whatnow
-noedit -prompt '' 2> "$actualerr" | sort > "$actual"
41 diff -u $expectederr $actualerr || exit 1
42 diff -u $expected $actual