Author: jilles
Date: Thu Jun 25 17:36:08 2009
New Revision: 194981
URL: http://svn.freebsd.org/changeset/base/194981

Log:
  Add some tests for r194975 and r194977.
  
  Approved by:  ed (mentor) (implicit)

Added:
  head/tools/regression/bin/sh/expansion/
  head/tools/regression/bin/sh/expansion/ifs1.0   (contents, props changed)

Added: head/tools/regression/bin/sh/expansion/ifs1.0
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/tools/regression/bin/sh/expansion/ifs1.0       Thu Jun 25 17:36:08 
2009        (r194981)
@@ -0,0 +1,35 @@
+# $FreeBSD$
+
+c=: e= s=' '
+failures=''
+ok=''
+
+check_result() {
+       if [ "x$2" = "x$3" ]; then
+               ok=x$ok
+       else
+               failures=x$failures
+               echo "For $1, expected $3 actual $2"
+       fi
+}
+
+IFS='  
+'
+set -- a ''
+set -- "$@"
+check_result 'set -- "$@"' "($#)($1)($2)" "(2)(a)()"
+
+set -- a ''
+set -- "$@"$e
+check_result 'set -- "$@"$e' "($#)($1)($2)" "(2)(a)()"
+
+set -- a ''
+set -- "$@"$s
+check_result 'set -- "$@"$s' "($#)($1)($2)" "(2)(a)()"
+
+IFS="$c"
+set -- a ''
+set -- "$@"$c
+check_result 'set -- "$@"$c' "($#)($1)($2)" "(2)(a)()"
+
+test "x$failures" = x
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to