2 ######################################################
4 # Test that whatnow's "cd" copes with directory names
5 # which have spaces and quotes in them (see bug #23319)
7 ######################################################
10 SPDIR="$MH_TEST_DIR/foo's bar"
17 expectederr=$MH_TEST_DIR/$$.expectederr
18 actualerr=$MH_TEST_DIR/$$.actualerr
19 expected=$MH_TEST_DIR/$$.expected
20 actual=$MH_TEST_DIR/$$.actual
26 cat > $expectederr <<EOF
29 # ||true to ignore whatnow's exit status
30 # watch the quoting -- shell and printf and then the shell run inside whatnow
31 printf "cd $MH_TEST_DIR/foo\\\\'s\\\\ bar\npwd\n" | whatnow -noedit -prompt '' 2> "$actualerr" > "$actual" || true
33 diff -u $expectederr $actualerr
34 diff -u $expected $actual