diff options
-rwxr-xr-x | tests/test.lua | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/test.lua b/tests/test.lua index 8adad1a..be16af9 100755 --- a/tests/test.lua +++ b/tests/test.lua | |||
@@ -282,8 +282,9 @@ end | |||
282 | 282 | ||
283 | 283 | ||
284 | if string.pack then | 284 | if string.pack then |
285 | -- TODO | 285 | local format = "bBhHlLjJdc3z" |
286 | print("TODO: test string packing/unpacking") | 286 | local s = string.pack(format, -128, 255, -32768, 65535, -2147483648, 4294967295, -32768, 65536, 1.25, "abc", "defgh") |
287 | print("string.unpack", string.unpack(format, s)) | ||
287 | ___'' | 288 | ___'' |
288 | else | 289 | else |
289 | print("XXX: string packing not available") | 290 | print("XXX: string packing not available") |
@@ -770,6 +771,9 @@ local t = setmetatable({}, { | |||
770 | __tostring = function(v) return nil end | 771 | __tostring = function(v) return nil end |
771 | }) | 772 | }) |
772 | print(pcall(mod.tolstring, t)) | 773 | print(pcall(mod.tolstring, t)) |
774 | local ud, meta = mod.newproxy() | ||
775 | meta.__name = "XXX" | ||
776 | print(mod.tolstring(ud):gsub(":.*$", ": yyy")) | ||
773 | 777 | ||
774 | ___'' | 778 | ___'' |
775 | print(mod.buffer()) | 779 | print(mod.buffer()) |