From fedcb75c0fa087abcaa53a1df3304a97c4516faa Mon Sep 17 00:00:00 2001 From: Benoit Giannangeli Date: Fri, 31 Mar 2017 08:44:13 +0200 Subject: Fixed bad \0 check on %s format --- tests/single.lua | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tests') 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") -- cgit v1.2.3-70-g09d2