aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2013-03-24 15:24:29 -0700
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2013-03-24 15:58:24 -0700
commit9394583f96cf23634f9e34bf8537fa2001ed1c9f (patch)
tree2567513d4499d733ed58dd0ace77a3d141bff489 /tests
parent3b4f4c5f596740f344cc0a00c9d3aad5dc8ebfcf (diff)
Implement actual error handling for builtin_printf. Fix the tests.
Diffstat (limited to 'tests')
-rw-r--r--tests/printf.in12
-rw-r--r--tests/printf.out7
2 files changed, 17 insertions, 2 deletions
diff --git a/tests/printf.in b/tests/printf.in
index f0669469..6f24ad56 100644
--- a/tests/printf.in
+++ b/tests/printf.in
@@ -17,3 +17,15 @@ printf "abc\rdef\n"
printf "Msg1\fMsg2\n"
printf "foo\vbar\vbaz\n"
printf "\111 \x50" # \u0051 \U00000052
+
+echo
+echo "Test escapes"
+
+# \c escape means "stop printing"
+printf 'a\cb'
+echo
+
+# Bogus printf specifier, should produce no stdout
+printf "%5" 10 ^ /dev/null
+
+true
diff --git a/tests/printf.out b/tests/printf.out
index b24cfc7b..bf9e2c84 100644
--- a/tests/printf.out
+++ b/tests/printf.out
@@ -7,7 +7,10 @@ a hello
5 10
100
%"\nxy
-abc def
+abc
+def
Msg1 Msg2
foo bar baz
-I P \ No newline at end of file
+I P
+Test escapes
+a