diff --git a/Build.sh b/Build.sh index d2dae95..ca6537b 100644 --- a/Build.sh +++ b/Build.sh @@ -1,5 +1,5 @@ #!/bin/sh -srcversion='$MirOS: src/bin/mksh/Build.sh,v 1.309 2008/04/01 17:14:31 tg Exp $' +srcversion='$MirOS: src/bin/mksh/Build.sh,v 1.310 2008/04/01 17:22:53 tg Exp $' #- # Environment used: CC CFLAGS CPPFLAGS LDFLAGS LIBS NOWARN NROFF TARGET_OS # CPPFLAGS recognised: MKSH_SMALL MKSH_ASSUME_UTF8 MKSH_NOPWNAM MKSH_NOVI @@ -1227,6 +1227,7 @@ case $curdir in esac cat >>test.sh <<-EOF export PATH='$PATH' + check_categories=$check_categories print Testing mksh for conformance: fgrep MirOS: '$srcdir/check.t' fgrep MIRBSD '$srcdir/check.t' @@ -1235,8 +1236,11 @@ cat >>test.sh <<-EOF perl=perl5 \$perl -e print >/dev/null 2>&1 || perl=perl \$perl -e print >/dev/null 2>&1 || exit 1 + print '\\ufeffprint "moien";' >test.tmp + [[ \$(\$perl test.tmp 2>&1) = moien ]] || \\ + check_categories=\$check_categories,oldish-perl exec \$perl '$srcdir/check.pl' -s '$srcdir/check.t' \\ - -p '$curdir/mksh' -C $check_categories \$*$tsts + -p '$curdir/mksh' -C \$check_categories \$*$tsts EOF chmod 755 test.sh echo set -x >Rebuild.sh diff --git a/check.t b/check.t index 901fbcd..6f20196 100644 --- a/check.t +++ b/check.t @@ -1,4 +1,4 @@ -# $MirOS: src/bin/mksh/check.t,v 1.167 2008/04/01 16:26:42 tg Exp $ +# $MirOS: src/bin/mksh/check.t,v 1.168 2008/04/01 17:22:54 tg Exp $ # $OpenBSD: bksl-nl.t,v 1.2 2001/01/28 23:04:56 niklas Exp $ # $OpenBSD: history.t,v 1.5 2001/01/28 23:04:56 niklas Exp $ # $OpenBSD: read.t,v 1.3 2003/03/10 03:48:16 david Exp $ @@ -4283,14 +4283,12 @@ expected-stdout: ohne : mit --- -name: utf8bom-2 +name: utf8bom-2a description: Check that we can execute BOM-shebangs XXX if the OS can already execute them, we lose note: cygwin execve(2) doesn't return to us with ENOEXEC, we lose - note: perl 5.004_04 on Linux 2.0 doesn't support Unicode, t4 fails - note: same for perl 5.003_02 on BSD/OS 3.1 and possibly others -category: pdksh,!os:cygwin,!os:uwin-nt +category: pdksh,!os:cygwin,!os:uwin-nt,!oldish-perl env-setup: !FOO=BAR! stdin: print '#!'"$__progname"'\nprint "a=$ENV{FOO}";' >t1 @@ -4308,6 +4306,30 @@ expected-stdout: a=BAR a=BAR --- +name: utf8bom-2b +description: + Check that we can execute BOM-shebangs + XXX if the OS can already execute them, we lose +category: pdksh,oldish-perl +env-setup: !FOO=BAR! +stdin: + print '#!'"$__progname"'\nprint "a=$ENV{FOO}";' >t1 + print '#!'"$__progname"'\nprint "a=$ENV{FOO}";' >t2 + print '#!'"$__perlname"'\nprint "a=$ENV{FOO}\n";' >t3 + print '#!'"$__perlname"'\nprint "a=$ENV{FOO}\n";' >t4 + chmod +x t? + ./t1 + ./t2 + ./t3 + ./t4 +expected-stdout: + a=/nonexistant{FOO} + a=/nonexistant{FOO} + a=BAR + a=BAR +expected-stderr-pattern: + /nrecogni.ed/ +--- name: utf8bom-3 description: Reading the UTF-8 BOM should enable the utf8-hack flag