mirror of
https://github.com/sheumann/hush.git
synced 2024-10-27 23:26:30 +00:00
added testsuite for printf by Cristian Ionescu-Idbohrn
This commit is contained in:
parent
7d60fc1c0a
commit
50120dab4e
27
testsuite/printf.tests
Executable file
27
testsuite/printf.tests
Executable file
@ -0,0 +1,27 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
. testing.sh
|
||||||
|
|
||||||
|
# Need this in order to not execute shell builtin
|
||||||
|
bb="busybox "
|
||||||
|
|
||||||
|
# testing "test name" "command" "expected result" "file input" "stdin"
|
||||||
|
|
||||||
|
testing "printf produce no further output 1" \
|
||||||
|
"${bb}printf '\c' foo" \
|
||||||
|
"" \
|
||||||
|
"" ""
|
||||||
|
|
||||||
|
testing "printf produce no further output 2" \
|
||||||
|
"${bb}printf '%s\c' foo \$HOME" \
|
||||||
|
"foo" \
|
||||||
|
"" ""
|
||||||
|
|
||||||
|
testing "printf repeatedly use pattern for each argv" \
|
||||||
|
"${bb}printf '%s\n' foo \$HOME" \
|
||||||
|
"foo\n$HOME\n" \
|
||||||
|
"" ""
|
||||||
|
|
||||||
|
exit $FAILCOUNT
|
Loading…
Reference in New Issue
Block a user