]>
diplodocus.org Git - nmh/blob - test/format/test-rightjustify
3 # Test that the right justification feature works correctly.
6 if test -z "${MH_OBJ_DIR}"; then
7 srcdir
=`dirname "$0"`/..
/..
8 MH_OBJ_DIR
=`cd "$srcdir" && pwd`; export MH_OBJ_DIR
11 .
"$MH_OBJ_DIR/test/common.sh"
15 for prefix
in '' '>' '2>'; do
16 actual
=`run_prog ${MH_LIBEXEC_DIR}/ap -format "$prefix%-20(friendly{text})<<End of test" 'No Such User <nosuch@user.com>'`
17 expected
="$prefix No Such User<<End of test"
20 if test x
"$actual" != x
"$expected"; then
21 echo "$0: right justification test expected:" 1>&2
22 echo " $expected" 1>&2
23 echo "but instead got:" 1>&2
25 failed
=`expr ${failed:-0} + 1`