svn commit: r305305 - head/bin/sh/tests/builtins
Jilles Tjoelker
jilles at FreeBSD.org
Fri Sep 2 21:13:48 UTC 2016
Author: jilles
Date: Fri Sep 2 21:13:46 2016
New Revision: 305305
URL: https://svnweb.freebsd.org/changeset/base/305305
Log:
sh: Add some tests for non-standard features of the echo builtin.
MFC after: 1 week
Added:
head/bin/sh/tests/builtins/echo1.0 (contents, props changed)
head/bin/sh/tests/builtins/echo2.0 (contents, props changed)
head/bin/sh/tests/builtins/echo3.0 (contents, props changed)
Modified:
head/bin/sh/tests/builtins/Makefile
Modified: head/bin/sh/tests/builtins/Makefile
==============================================================================
--- head/bin/sh/tests/builtins/Makefile Fri Sep 2 21:11:37 2016 (r305304)
+++ head/bin/sh/tests/builtins/Makefile Fri Sep 2 21:13:46 2016 (r305305)
@@ -68,6 +68,9 @@ ${PACKAGE}FILES+= dot1.0
${PACKAGE}FILES+= dot2.0
${PACKAGE}FILES+= dot3.0
${PACKAGE}FILES+= dot4.0
+${PACKAGE}FILES+= echo1.0
+${PACKAGE}FILES+= echo2.0
+${PACKAGE}FILES+= echo3.0
${PACKAGE}FILES+= eval1.0
${PACKAGE}FILES+= eval2.0
${PACKAGE}FILES+= eval3.0
Added: head/bin/sh/tests/builtins/echo1.0
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/bin/sh/tests/builtins/echo1.0 Fri Sep 2 21:13:46 2016 (r305305)
@@ -0,0 +1,6 @@
+# $FreeBSD$
+
+# Not specified by POSIX.
+
+[ "`echo -n a b; echo c d; echo e f`" = "a bc d
+e f" ]
Added: head/bin/sh/tests/builtins/echo2.0
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/bin/sh/tests/builtins/echo2.0 Fri Sep 2 21:13:46 2016 (r305305)
@@ -0,0 +1,7 @@
+# $FreeBSD$
+
+# Not specified by POSIX.
+
+a=`echo -e '\a\b\e\f\n\r\t\v\\\\\0041\c'; echo .`
+b=`printf '\a\b\033\f\n\r\t\v\\\\!.'`
+[ "$a" = "$b" ]
Added: head/bin/sh/tests/builtins/echo3.0
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/bin/sh/tests/builtins/echo3.0 Fri Sep 2 21:13:46 2016 (r305305)
@@ -0,0 +1,5 @@
+# $FreeBSD$
+
+# Not specified by POSIX.
+
+[ "`echo -e 'a\cb' c; echo d`" = "ad" ]
More information about the svn-src-all
mailing list