From 50120dab4e78e6531d640fe8f86675f8d06a7467 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Thu, 5 Jun 2008 08:27:26 +0000 Subject: added testsuite for printf by Cristian Ionescu-Idbohrn --- testsuite/printf.tests | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100755 testsuite/printf.tests 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 @@ +#!/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 -- cgit v1.2.3