svn commit: r280920 - head/bin/sh/tests/expansion

Jilles Tjoelker jilles at FreeBSD.org
Tue Mar 31 20:59:39 UTC 2015


Author: jilles
Date: Tue Mar 31 20:59:37 2015
New Revision: 280920
URL: https://svnweb.freebsd.org/changeset/base/280920

Log:
  sh: Add more tests for exotic IFS splitting.

Added:
  head/bin/sh/tests/expansion/ifs6.0   (contents, props changed)
  head/bin/sh/tests/expansion/ifs7.0   (contents, props changed)
Modified:
  head/bin/sh/tests/expansion/Makefile

Modified: head/bin/sh/tests/expansion/Makefile
==============================================================================
--- head/bin/sh/tests/expansion/Makefile	Tue Mar 31 20:51:01 2015	(r280919)
+++ head/bin/sh/tests/expansion/Makefile	Tue Mar 31 20:59:37 2015	(r280920)
@@ -49,6 +49,8 @@ FILES+=		ifs2.0
 FILES+=		ifs3.0
 FILES+=		ifs4.0
 FILES+=		ifs5.0
+FILES+=		ifs6.0
+FILES+=		ifs7.0
 FILES+=		length1.0
 FILES+=		length2.0
 FILES+=		length3.0

Added: head/bin/sh/tests/expansion/ifs6.0
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/bin/sh/tests/expansion/ifs6.0	Tue Mar 31 20:59:37 2015	(r280920)
@@ -0,0 +1,6 @@
+# $FreeBSD$
+
+IFS=': '
+x=': :'
+set -- $x
+[ "$#|$1|$2|$3" = "2|||" ]

Added: head/bin/sh/tests/expansion/ifs7.0
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/bin/sh/tests/expansion/ifs7.0	Tue Mar 31 20:59:37 2015	(r280920)
@@ -0,0 +1,5 @@
+# $FreeBSD$
+
+IFS=2
+set -- $((123))
+[ "$#|$1|$2|$3" = "2|1|3|" ]


More information about the svn-src-all mailing list