sh: Add some tests for non-standard features of the echo builtin.

MFC after:	1 week
This commit is contained in:
Jilles Tjoelker 2016-09-02 21:13:46 +00:00
parent 8f120c0db3
commit 681e94f4d0
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=305305
4 changed files with 21 additions and 0 deletions

View File

@ -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

View File

@ -0,0 +1,6 @@
# $FreeBSD$
# Not specified by POSIX.
[ "`echo -n a b; echo c d; echo e f`" = "a bc d
e f" ]

View File

@ -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" ]

View File

@ -0,0 +1,5 @@
# $FreeBSD$
# Not specified by POSIX.
[ "`echo -e 'a\cb' c; echo d`" = "ad" ]