]>
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 ######################################################
11 if test -z "${MH_OBJ_DIR}"; then
12 srcdir
=`dirname "$0"`/..
/..
13 MH_OBJ_DIR
=`cd "$srcdir" && pwd`; export MH_OBJ_DIR
16 .
"$MH_OBJ_DIR/test/common.sh"
20 SPDIR
="$MH_TEST_DIR/foo's bar"
26 expectederr
=$MH_TEST_DIR/$$.expectederr
27 actualerr
=$MH_TEST_DIR/$$.actualerr
28 expected
=$MH_TEST_DIR/$$.expected
29 actual
=$MH_TEST_DIR/$$.actual
36 cat > $expectederr <<EOF
39 # NB use of sort as the order of output of ls is not guaranteed
40 echo 'ls' | whatnow
-noedit -prompt '' 2> "$actualerr" | sort > "$actual"
42 check
"$expectederr" "$actualerr"
43 check
"$expected" "$actual"
45 test ${failed:-0} -eq 0 && rm -r "$SPDIR"