diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2008-06-05 08:27:26 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2008-06-05 08:27:26 +0000 |
commit | 50120dab4e78e6531d640fe8f86675f8d06a7467 (patch) | |
tree | 2f8b7fef0c9117a79df8a899ab88f0fb8af0eecd /testsuite | |
parent | 7d60fc1c0a96983d0909f50f8db26ca1b770b039 (diff) | |
download | busybox-w32-50120dab4e78e6531d640fe8f86675f8d06a7467.tar.gz busybox-w32-50120dab4e78e6531d640fe8f86675f8d06a7467.tar.bz2 busybox-w32-50120dab4e78e6531d640fe8f86675f8d06a7467.zip |
added testsuite for printf by Cristian Ionescu-Idbohrn
Diffstat (limited to 'testsuite')
-rwxr-xr-x | testsuite/printf.tests | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/testsuite/printf.tests b/testsuite/printf.tests new file mode 100755 index 000000000..18f25e3f1 --- /dev/null +++ b/testsuite/printf.tests | |||
@@ -0,0 +1,27 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | set -e | ||
4 | |||
5 | . testing.sh | ||
6 | |||
7 | # Need this in order to not execute shell builtin | ||
8 | bb="busybox " | ||
9 | |||
10 | # testing "test name" "command" "expected result" "file input" "stdin" | ||
11 | |||
12 | testing "printf produce no further output 1" \ | ||
13 | "${bb}printf '\c' foo" \ | ||
14 | "" \ | ||
15 | "" "" | ||
16 | |||
17 | testing "printf produce no further output 2" \ | ||
18 | "${bb}printf '%s\c' foo \$HOME" \ | ||
19 | "foo" \ | ||
20 | "" "" | ||
21 | |||
22 | testing "printf repeatedly use pattern for each argv" \ | ||
23 | "${bb}printf '%s\n' foo \$HOME" \ | ||
24 | "foo\n$HOME\n" \ | ||
25 | "" "" | ||
26 | |||
27 | exit $FAILCOUNT | ||