diff options
author | Siteshwar Vashisht <siteshwar@gmail.com> | 2013-03-03 00:45:34 +0530 |
---|---|---|
committer | Siteshwar Vashisht <siteshwar@gmail.com> | 2013-03-03 00:45:34 +0530 |
commit | be7d02ebdde5c30d664496c57c3265469907004e (patch) | |
tree | ed7a44309221143900dcc9b2447dc645b48a373c /tests/printf.in | |
parent | b989978dd3db7e27ce62d9b43aef8564c69f3e60 (diff) |
Added test cases for printf builtin
Diffstat (limited to 'tests/printf.in')
-rw-r--r-- | tests/printf.in | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/printf.in b/tests/printf.in new file mode 100644 index 00000000..f0669469 --- /dev/null +++ b/tests/printf.in @@ -0,0 +1,19 @@ +printf "Hello %d %i %f %F %g %G\n" 1 2 3 4 5 6 + +printf "%x %X %o %u\n" 10 11 8 -1 +printf "%a %A\n" 14 15 + +printf "%c %s\n" a hello +printf "%e %E\n" 5 6 + +printf "%20d\n" 50 +printf "%-20d%d\n" 5 10 + +printf "%*d\n" 10 100 + +printf "%%\"\\\n" +printf "%s\b%s\n" x y +printf "abc\rdef\n" +printf "Msg1\fMsg2\n" +printf "foo\vbar\vbaz\n" +printf "\111 \x50" # \u0051 \U00000052 |