From 31c96f9d9d985fbd599cdc74f50a3293dffaa117 Mon Sep 17 00:00:00 2001 From: tg Date: Wed, 8 Apr 2009 18:00:53 +0000 Subject: [PATCH] make UTF related regression tests more clear --- check.t | 38 ++++++++++++++++++++++++-------------- 1 file changed, 24 insertions(+), 14 deletions(-) diff --git a/check.t b/check.t index 7841176..90e996c 100644 --- a/check.t +++ b/check.t @@ -1,4 +1,4 @@ -# $MirOS: src/bin/mksh/check.t,v 1.270 2009/04/07 19:43:26 tg Exp $ +# $MirOS: src/bin/mksh/check.t,v 1.271 2009/04/08 18:00:53 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 $ @@ -4558,56 +4558,66 @@ stdin: chmod +x foo/* export PATH=$(pwd)/foo:$PATH "$__progname" -c 'fnord' + echo = "$__progname" -c 'fnord; fnord; fnord; fnord' + echo = "$__progname" foo/bar + echo = "$__progname" t1 - print '#!'"$__progname"'\nprint "a=$ENV{FOO}";' >t2 - print '#!'"$__perlname"'\nprint "a=$ENV{FOO}\n";' >t3 - print '#!'"$__perlname"'\nprint "a=$ENV{FOO}\n";' >t4 + print '#!'"$__progname"'\nprint "1 a=$ENV{FOO}";' >t1 + print '#!'"$__progname"'\nprint "2 a=$ENV{FOO}";' >t2 + print '#!'"$__perlname"'\nprint "3 a=$ENV{FOO}\n";' >t3 + print '#!'"$__perlname"'\nprint "4 a=$ENV{FOO}\n";' >t4 chmod +x t? ./t1 ./t2 ./t3 ./t4 expected-stdout: - a=/nonexistant{FOO} - a=/nonexistant{FOO} - a=BAR - a=BAR + 1 a=/nonexistant{FOO} + 2 a=/nonexistant{FOO} + 3 a=BAR + 4 a=BAR expected-stderr-pattern: /(Unrecognized character .... ignored at \..t4 line 1)*/ --- @@ -4615,11 +4625,11 @@ name: utf8bom-3 description: Reading the UTF-8 BOM should enable the utf8-mode flag stdin: - "$__progname" -c ':; if [[ $- = *U* ]]; then print on; else print off; fi' - "$__progname" -c ':; if [[ $- = *U* ]]; then print on; else print off; fi' + "$__progname" -c ':; if [[ $- = *U* ]]; then print 1 on; else print 1 off; fi' + "$__progname" -c ':; if [[ $- = *U* ]]; then print 2 on; else print 2 off; fi' expected-stdout: - off - on + 1 off + 2 on --- name: utf8opt-1a description: