]>
diplodocus.org Git - nmh/blob - test/install-mh/test-version-check
2 ######################################################
4 # Test display of new version welcome message. This
5 # doesn't really belong in install-mh.
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"
22 actual
="$MH_TEST_DIR/test-version-check$$.actual"
23 context
="${MH_TEST_DIR}"/Mail
/context
25 # Removing Version will trigger the welcome message.
26 grep -v Version
"$context" > "$context.NEW"
27 mv -f "$context.NEW" "$context"
30 start_test
'mhparam skips the welcome message'
31 # The command will wait for the user to hit return. script seems to do what
32 # we want by not waiting when run in the background.
33 script -c 'mhparam path last' -f -q "$actual" >/dev
/null
&
35 grep 'Welcome to nmh version ' "$actual" >/dev
/null
&& false
40 start_test
'with welcome message'
41 script -c 'pick last' -f -q "$actual" >/dev
/null
&
43 grep 'Welcome to nmh version ' "$actual" >/dev
/null
48 start_test
'without welcome message'
49 # After running the previous test, this one should not have
50 # the welcome message.
51 script -c 'pick last' -f -q "$actual" >/dev
/null
&
53 grep 'Welcome to nmh version ' "$actual" >/dev
/null
&& false