diff options
author | Benoit Giannangeli <giann008@gmail.com> | 2017-03-31 08:44:13 +0200 |
---|---|---|
committer | Benoit Giannangeli <giann008@gmail.com> | 2017-03-31 08:44:13 +0200 |
commit | fedcb75c0fa087abcaa53a1df3304a97c4516faa (patch) | |
tree | 76b1750cf3e747228ae2576c38ee8b735a625237 /tests/single.lua | |
parent | 3813f2d43054708bab7221a5ca74a0183a2ebcaf (diff) | |
download | fengari-fedcb75c0fa087abcaa53a1df3304a97c4516faa.tar.gz fengari-fedcb75c0fa087abcaa53a1df3304a97c4516faa.tar.bz2 fengari-fedcb75c0fa087abcaa53a1df3304a97c4516faa.zip |
Fixed bad \0 check on %s format
Diffstat (limited to 'tests/single.lua')
-rw-r--r-- | tests/single.lua | 3 |
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") |