aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rwxr-xr-xtests/printf.test9
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/printf.test b/tests/printf.test
index a341615e..30525c6b 100755
--- a/tests/printf.test
+++ b/tests/printf.test
@@ -11,10 +11,15 @@
PRINTF="$(which printf)"
testing "text" "$PRINTF TEXT" "TEXT" "" ""
+
+# TODO: we have to use \x1b rather than \e in the expectations because
+# the Mac is stuck on bash 3.2 which doesn't support \e. This can go
+# away when we have a usable toysh.
testing "escapes" "$PRINTF 'one\ntwo\n\v\t\r\f\e\b\athree'" \
- "one\ntwo\n\v\t\r\f\e\b\athree" "" ""
+ "one\ntwo\n\v\t\r\f\x1b\b\athree" "" ""
testing "%b escapes" "$PRINTF %b 'one\ntwo\n\v\t\r\f\e\b\athree'" \
- "one\ntwo\n\v\t\r\f\e\b\athree" "" ""
+ "one\ntwo\n\v\t\r\f\x1b\b\athree" "" ""
+
testing "null" "$PRINTF 'x\0y' | od -An -tx1" ' 78 00 79\n' "" ""
testing "trailing slash" "$PRINTF 'abc\'" 'abc\' "" ""
testing "octal" "$PRINTF ' \1\002\429\045x'" ' \001\002"9%x' "" ""