aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBenoit Giannangeli <giann008@gmail.com>2017-03-31 08:44:13 +0200
committerBenoit Giannangeli <giann008@gmail.com>2017-03-31 08:44:13 +0200
commitfedcb75c0fa087abcaa53a1df3304a97c4516faa (patch)
tree76b1750cf3e747228ae2576c38ee8b735a625237 /tests
parent3813f2d43054708bab7221a5ca74a0183a2ebcaf (diff)
downloadfengari-fedcb75c0fa087abcaa53a1df3304a97c4516faa.tar.gz
fengari-fedcb75c0fa087abcaa53a1df3304a97c4516faa.tar.bz2
fengari-fedcb75c0fa087abcaa53a1df3304a97c4516faa.zip
Fixed bad \0 check on %s format
Diffstat (limited to 'tests')
-rw-r--r--tests/single.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/single.lua b/tests/single.lua
index f5f63f3..c1241de 100644
--- a/tests/single.lua
+++ b/tests/single.lua
@@ -187,3 +187,6 @@ do
checkQ(false)
checkerror("no literal", string.format, "%q", {})
end
+
+assert(string.format("\0%s\0", "\0\0\1") == "\0\0\0\1\0")
+checkerror("contains zeros", string.format, "%10s", "\0")