diff options
author | Jo-Philipp Wich <jo@mein.io> | 2021-05-04 12:15:59 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-04 12:15:59 +0200 |
commit | 776dc9e3166dfc3735bd72be3acd26ebc6a591f5 (patch) | |
tree | ff0968c366537455aa1d7bfc42dff81549016e31 /tests | |
parent | 02629b84de23bdc5896ac4b357e2f16dfb3996ec (diff) | |
parent | c4d1648ca6c3ac005b75c3b3b0bb79e664bead75 (diff) |
Merge pull request #6 from jow-/printf-improvements
String format improvements
Diffstat (limited to 'tests')
-rw-r--r-- | tests/custom/03_bugs/19_truncated_format_string | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/custom/03_bugs/19_truncated_format_string b/tests/custom/03_bugs/19_truncated_format_string new file mode 100644 index 0000000..8ddd0a3 --- /dev/null +++ b/tests/custom/03_bugs/19_truncated_format_string @@ -0,0 +1,14 @@ +When processing a truncated format string, uc_printf_common() - which is +used by `sprintf()` and `printf()` in ucode - appended trailing garbage +to the resulting string. + +-- Expect stdout -- +[ 37, null ] +-- End -- + +-- Testcase -- +{% + let s = sprintf("%"); + print(ord(s, 0, 1), "\n"); +%} +-- End -- |