Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 2 Sep 2016 21:13:46 +0000 (UTC)
From:      Jilles Tjoelker <jilles@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r305305 - head/bin/sh/tests/builtins
Message-ID:  <201609022113.u82LDkkO007303@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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" ]



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201609022113.u82LDkkO007303>