| 1 |
#!/bin/sh |
| 2 |
# |
| 3 |
# Test that a NULL str register doesn't cause the string handling format |
| 4 |
# escapes to fail. |
| 5 |
# |
| 6 |
|
| 7 |
set -e |
| 8 |
|
| 9 |
if test -z "${MH_OBJ_DIR}"; then |
| 10 |
srcdir=`dirname "$0"`/../.. |
| 11 |
MH_OBJ_DIR=`cd "$srcdir" && pwd`; export MH_OBJ_DIR |
| 12 |
fi |
| 13 |
|
| 14 |
. "$MH_OBJ_DIR/test/common.sh" |
| 15 |
|
| 16 |
setup_test |
| 17 |
|
| 18 |
# |
| 19 |
# %{null} is arbitrary; it could be any component that does not exist. |
| 20 |
# |
| 21 |
|
| 22 |
run_test "fmttest -raw -format Test%(putstr{null}) dummy" "Test" \ |
| 23 |
"Test of %(putstr)" |
| 24 |
run_test "fmttest -raw -format Test%10(putstrf{null}) dummy" "Test " \ |
| 25 |
"Test of %(putstrf)" |
| 26 |
run_test "fmttest -raw -format Test%(putlit{null}) dummy" "Test" \ |
| 27 |
"Test of %(putlit)" |
| 28 |
run_test "fmttest -raw -format Test%(zputlit{null}) dummy" "Test" \ |
| 29 |
"Test of %(zputlit)" |
| 30 |
|
| 31 |
exit $failed |