[ksh] fix regression test

Michal Hlavinka mhlavink at fedoraproject.org
Wed Aug 8 10:30:09 UTC 2012


commit a643db649dc68776ba409da4b81457580111ac55
Author: Michal Hlavinka <mhlavink at redhat.com>
Date:   Wed Aug 8 12:29:42 2012 +0200

    fix regression test

 ksh-20100826-fixregr.patch |   23 ++++++++++++++++-------
 1 files changed, 16 insertions(+), 7 deletions(-)
---
diff --git a/ksh-20100826-fixregr.patch b/ksh-20100826-fixregr.patch
index 1b7fdbe..87cb13c 100644
--- a/ksh-20100826-fixregr.patch
+++ b/ksh-20100826-fixregr.patch
@@ -1,7 +1,7 @@
-diff -up ksh-20101122/src/cmd/ksh93/tests/builtins.sh.fixregr ksh-20101122/src/cmd/ksh93/tests/builtins.sh
---- ksh-20101122/src/cmd/ksh93/tests/builtins.sh.fixregr	2010-10-27 08:52:38.000000000 +0200
-+++ ksh-20101122/src/cmd/ksh93/tests/builtins.sh	2010-11-26 10:17:05.653551931 +0100
-@@ -291,9 +291,9 @@ then	err_exit "printf '%..*s' not workin
+diff -up ksh-20120801/src/cmd/ksh93/tests/builtins.sh.fixregr ksh-20120801/src/cmd/ksh93/tests/builtins.sh
+--- ksh-20120801/src/cmd/ksh93/tests/builtins.sh.fixregr	2012-07-16 17:23:56.000000000 +0200
++++ ksh-20120801/src/cmd/ksh93/tests/builtins.sh	2012-08-08 12:29:00.733243019 +0200
+@@ -303,9 +303,9 @@ then	err_exit "printf '%..*s' not workin
  fi
  [[ $(printf '%q\n') == '' ]] || err_exit 'printf "%q" with missing arguments'
  # we won't get hit by the one second boundary twice, right?
@@ -14,9 +14,9 @@ diff -up ksh-20101122/src/cmd/ksh93/tests/builtins.sh.fixregr ksh-20101122/src/c
  behead()
  {
  	read line
-diff -up ksh-20101122/src/cmd/ksh93/tests/locale.sh.fixregr ksh-20101122/src/cmd/ksh93/tests/locale.sh
---- ksh-20101122/src/cmd/ksh93/tests/locale.sh.fixregr	2010-11-13 01:29:23.000000000 +0100
-+++ ksh-20101122/src/cmd/ksh93/tests/locale.sh	2010-11-26 10:08:17.334737934 +0100
+diff -up ksh-20120801/src/cmd/ksh93/tests/locale.sh.fixregr ksh-20120801/src/cmd/ksh93/tests/locale.sh
+--- ksh-20120801/src/cmd/ksh93/tests/locale.sh.fixregr	2012-06-26 21:57:46.000000000 +0200
++++ ksh-20120801/src/cmd/ksh93/tests/locale.sh	2012-08-08 12:29:20.039405240 +0200
 @@ -104,6 +104,7 @@ if	(( $($SHELL -c $'export LC_ALL='$loca
  then	LC_ALL=$locale $SHELL -c b1=$'"\342\202\254\342\202\254\342\202\254\342\202\254w\342\202\254\342\202\254\342\202\254\342\202\254"; [[ ${b1:4:1} == w ]]' || err_exit 'multibyte ${var:offset:len} not working correctly'
  fi
@@ -57,3 +57,12 @@ diff -up ksh-20101122/src/cmd/ksh93/tests/locale.sh.fixregr ksh-20101122/src/cmd
  
  printf 'f1\357\274\240f2\n' > input1
  printf 't2\357\274\240f1\n' > input2
+@@ -336,7 +340,7 @@ then	LC_ALL=en_US.UTF-8
+ 	[[ $(print -r -- "$x") == $'hello\u[20ac]\xee world' ]] || err_exit '%q with unicode and non-unicode not working'
+ 	if	[[ $(whence od) ]]
+ 	then	got='68 65 6c 6c 6f e2 82 ac ee 20 77 6f 72 6c 64 0a'
+-		[[ $(print -r -- "$x" | od -An -tx1) == "$got" ]] || err_exit "incorrect string from printf %q"
++		[[ $(print -r -- "$x" | od -An -tx1) =~ $got ]] || err_exit "incorrect string from printf %q"
+ 	fi
+ 	
+ fi


More information about the scm-commits mailing list