]>
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
26 start_test
'with welcome message'
27 # Removing Version will trigger the welcome message.
28 grep -v Version
"$context" > "$context.NEW"
29 mv -f "$context.NEW" "$context"
30 # The will command wait for the user to hit return. script seems to do what
31 # we want, continue, when run in the background.
32 script -c 'pick last' -f -q "$actual" >/dev
/null
&
34 grep 'Welcome to nmh version ' "$actual" >/dev
/null
39 start_test
'without welcome message'
40 # After running the previous test, this one should not have
41 # the welcome message.
42 script -c 'pick last' -f -q "$actual" >/dev
/null
&
44 grep 'Welcome to nmh version ' "$actual" >/dev
/null
&& false