summaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2021-05-04 12:15:59 +0200
committerGitHub <noreply@github.com>2021-05-04 12:15:59 +0200
commit776dc9e3166dfc3735bd72be3acd26ebc6a591f5 (patch)
treeff0968c366537455aa1d7bfc42dff81549016e31 /tests
parent02629b84de23bdc5896ac4b357e2f16dfb3996ec (diff)
parentc4d1648ca6c3ac005b75c3b3b0bb79e664bead75 (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_string14
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 --