Author: emaste
Date: Mon Dec 27 15:57:41 2010
New Revision: 216738
URL: http://svn.freebsd.org/changeset/base/216738

Log:
  Restore two commented-out tests from plus-minus1.0 to a new file.
  
  These two cases pass on -CURRENT but fail on stable/8.
  
  Reviewed by:  jilles

Added:
  head/tools/regression/bin/sh/expansion/plus-minus7.0   (contents, props 
changed)
Modified:
  head/tools/regression/bin/sh/expansion/plus-minus1.0

Modified: head/tools/regression/bin/sh/expansion/plus-minus1.0
==============================================================================
--- head/tools/regression/bin/sh/expansion/plus-minus1.0        Mon Dec 27 
15:05:15 2010        (r216737)
+++ head/tools/regression/bin/sh/expansion/plus-minus1.0        Mon Dec 27 
15:57:41 2010        (r216738)
@@ -43,9 +43,6 @@ testcase 'set -- ${e:+$w"$e"}'                        '0|'
 testcase 'set -- ${w:+"$w"}'                   '1|a b c'
 testcase 'set -- ${w:+$w"$w"}'                 '3|a|b|ca b c'
 
-# These two are known broken in FreeBSD /bin/sh
-#testcase 'set -- ${s+a b}'                    '2|a|b'
-#testcase 'set -- ${e:-a b}'                   '2|a|b'
 testcase 'set -- "${s+a b}"'                   '1|a b'
 testcase 'set -- "${e:-a b}"'                  '1|a b'
 testcase 'set -- ${e:-\}}'                     '1|}'

Added: head/tools/regression/bin/sh/expansion/plus-minus7.0
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/tools/regression/bin/sh/expansion/plus-minus7.0        Mon Dec 27 
15:57:41 2010        (r216738)
@@ -0,0 +1,26 @@
+# $FreeBSD$
+
+e= s='foo'
+failures=''
+ok=''
+
+testcase() {
+       code="$1"
+       expected="$2"
+       oIFS="$IFS"
+       eval "$code"
+       IFS='|'
+       result="$#|$*"
+       IFS="$oIFS"
+       if [ "x$result" = "x$expected" ]; then
+               ok=x$ok
+       else
+               failures=x$failures
+               echo "For $code, expected $expected actual $result"
+       fi
+}
+
+testcase 'set -- ${s+a b}'                     '2|a|b'
+testcase 'set -- ${e:-a b}'                    '2|a|b'
+
+test "x$failures" = x
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to