Propagate nil in Lua APIs more often

This commit is contained in:
Justine Tunney 2022-08-05 17:34:13 -07:00
parent c9d7838213
commit 638c56e3a5
5 changed files with 78 additions and 43 deletions

View file

@ -15,6 +15,8 @@
unix.pledge('stdio')
assert(Md5(nil) == nil)
-- https://datatracker.ietf.org/doc/html/rfc1321#appendix-A.5
assert(Md5("hello") == "\x5d\x41\x40\x2a\xbc\x4b\x2a\x76\xb9\x71\x9d\x91\x10\x17\xc5\x92")
assert(Md5("") == "\xd4\x1d\x8c\xd9\x8f\x00\xb2\x04\xe9\x80\x09\x98\xec\xf8\x42\x7e")