github.com/marcomrtt/gopher-lua@v0.1.1/_glua-tests/strings.lua (about) 1 2 local ok, msg = pcall(function() 3 string.dump() 4 end) 5 assert(not ok and string.find(msg, "GopherLua does not support the string.dump")) 6 assert(string.find("","aaa") == nil) 7 assert(string.gsub("hello world", "(%w+)", "%1 %1 %c") == "hello hello %c world world %c") 8 9 local ret1, ret2, ret3, ret4 = string.find("aaa bbb", "(%w+())") 10 assert(ret1 == 1) 11 assert(ret2 == 3) 12 assert(ret3 == "aaa") 13 assert(ret4 == 4)