| @@ -1,15 +1,15 @@ | | | @@ -1,15 +1,15 @@ |
1 | #! /bin/sh | | 1 | #! /bin/sh |
2 | # $NetBSD: sh-test.sh,v 1.1 2006/11/09 12:39:55 rillig Exp $ | | 2 | # $NetBSD: sh-test.sh,v 1.2 2018/11/30 19:55:26 rillig Exp $ |
3 | # | | 3 | # |
4 | | | 4 | |
5 | set -e | | 5 | set -e |
6 | | | 6 | |
7 | mydir=`dirname "$0"` | | 7 | mydir=`dirname "$0"` |
8 | . "${mydir}/tests.subr" | | 8 | . "${mydir}/tests.subr" |
9 | | | 9 | |
10 | # | | 10 | # |
11 | # Functions specific for the sh testsuite. | | 11 | # Functions specific for the sh testsuite. |
12 | # | | 12 | # |
13 | | | 13 | |
14 | # usage: sh_test <testname> <input> <expected-output> <args...> | | 14 | # usage: sh_test <testname> <input> <expected-output> <args...> |
15 | sh_test() { | | 15 | sh_test() { |
| @@ -27,15 +27,18 @@ EOF | | | @@ -27,15 +27,18 @@ EOF |
27 | sh_assert_equals() { | | 27 | sh_assert_equals() { |
28 | | | 28 | |
29 | testcase_start "$1" | | 29 | testcase_start "$1" |
30 | assert_equal "$1" "$2" "$3" | | 30 | assert_equal "$1" "$2" "$3" |
31 | } | | 31 | } |
32 | | | 32 | |
33 | # | | 33 | # |
34 | # The actual test. | | 34 | # The actual test. |
35 | # | | 35 | # |
36 | | | 36 | |
37 | nl=" | | 37 | nl=" |
38 | " | | 38 | " |
39 | | | 39 | |
| | | 40 | # This test fails with /bin/sh from 2018-11-08, see bin/53754. |
| | | 41 | if [ "`uname -s`" != "NetBSD" ]; then |
40 | line="#define bindir \"/usr/bin\" /* bar */" | | 42 | line="#define bindir \"/usr/bin\" /* bar */" |
41 | sh_assert_equals "removing C comments" "#define bindir \"/usr/bin\" " "${line%%/\**}" | | 43 | sh_assert_equals "removing C comments" "#define bindir \"/usr/bin\" " "${line%%/\**}" |
| | | 44 | fi |