]>
diplodocus.org Git - nmh/blob - test/mhshow/test-exec
3 # Test production and execution of user's commands.
7 if test -z "${MH_OBJ_DIR}"; then
8 srcdir
=`dirname "$0"`/..
/..
9 MH_OBJ_DIR
=`cd "$srcdir" && pwd`; export MH_OBJ_DIR
12 .
"$MH_OBJ_DIR/test/common.sh"
16 got
="$MH_TEST_DIR"/$$.got
17 want
="$MH_TEST_DIR"/$$.want
19 # The third word, if it exists, of the command executed is plucked as
20 # the name to display on the faulty assumption the arguments start ["sh",
21 # "-c"]. Plucking occurred for NULL in the past so test it here.
22 start_test
'plucking of third word for command'\''s display name'
27 Content
-Type: text
/foo
28 Date
: Sun
, 18 Dec
2005 00:52:39 +0100
33 for w
in false foo bar xyzzy
; do
35 if test $w = bar
; then argv2
="$w: "; fi
37 echo "mhshow-show-text/foo: $cmd" >>"$MH"
39 run_prog mhshow last
>"$got" 2>&1
43 Date
: Sun
, 18 Dec
2005 00:52:39 +0100
49 echo "${argv2}exited 1" >>"$want"
50 check
"$want" "$got" : check
"word $w"