2 ######################################################
4 # Test profile parser warning messages.
6 ######################################################
10 if test -z "${MH_OBJ_DIR}"; then
11 srcdir
=`dirname $0`/..
/..
12 MH_OBJ_DIR
=`cd $srcdir && pwd`; export MH_OBJ_DIR
15 .
"${MH_OBJ_DIR}/test/common.sh"
18 require_runpty_to_simulate_tty
20 actual
="${MH_TEST_DIR}/test-profile$$.actual"
21 expected
="$MH_TEST_DIR/test-profile$$.expected"
23 start_test
'without post component in profile'
25 run_test
'mhparam post' ''
28 start_test
'disabled post warning'
29 echo 'post: -snoop' >>"$MH"
30 run_test
'mhparam post' '-snoop'
32 start_test
'with no postproc component in profile'
33 grep -v '^postproc: ' "$MH" >"$MH.new"
34 cat >"$expected" <<EOF
35 mhparam: post profile component will be ignored. To suppress this warning,
36 either remove it, comment it with #:, or add the following to $MH.new:
37 postproc: ${nmhlibexecdir}/post
41 MH
="$MH.new" run_without_input
"${actual}" mhparam post
42 check
"$expected" "$actual"
45 start_test
'multiple profile components'
46 printf 'repeated-component: 1\nrepeated-component: 2\n' >>"$MH"
47 run_test
'mhparam moreproc' \
48 "mhparam: multiple \"repeated-component\" profile components in $MH,"\
49 " ignoring \"2\", continuing...