sh: Add some tests for non-standard features of the echo builtin.
MFC after: 1 week
This commit is contained in:
parent
8f120c0db3
commit
681e94f4d0
@ -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
|
||||
|
6
bin/sh/tests/builtins/echo1.0
Normal file
6
bin/sh/tests/builtins/echo1.0
Normal 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" ]
|
7
bin/sh/tests/builtins/echo2.0
Normal file
7
bin/sh/tests/builtins/echo2.0
Normal 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" ]
|
5
bin/sh/tests/builtins/echo3.0
Normal file
5
bin/sh/tests/builtins/echo3.0
Normal file
@ -0,0 +1,5 @@
|
||||
# $FreeBSD$
|
||||
|
||||
# Not specified by POSIX.
|
||||
|
||||
[ "`echo -e 'a\cb' c; echo d`" = "ad" ]
|
Loading…
x
Reference in New Issue
Block a user