summaryrefslogtreecommitdiff
path: root/tests/single.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tests/single.lua')
-rw-r--r--tests/single.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/single.lua b/tests/single.lua
index e3ba2f5..e8d7210 100644
--- a/tests/single.lua
+++ b/tests/single.lua
@@ -151,3 +151,8 @@ end
x = '"ílo"\n\\'
assert(string.format('%q%s', x, x) == '"\\"ílo\\"\\\n\\\\""ílo"\n\\')
assert(string.format('%q', "\0") == [["\0"]])
+assert(load(string.format('return %q', x))() == x)
+x = "\0\1\0023\5\0009"
+assert(load(string.format('return %q', x))() == x)
+assert(string.format("\0%c\0%c%x\0", string.byte("\xe4"), string.byte("b"), 140) ==
+ "\0\xe4\0b8c\0")