Skip to content

Commit

Permalink
Add test case for LuaJIT#86
Browse files Browse the repository at this point in the history
Resolves LuaJIT#86.

Signed-off-by: Siddhesh Poyarekar <[email protected]>
  • Loading branch information
siddhesh committed Jan 26, 2020
1 parent cabe3b3 commit a15d664
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/lib/string/sub.lua
Original file line number Diff line number Diff line change
Expand Up @@ -187,3 +187,8 @@ do --- jit sub i,i
end
assert(table.concat(t) == string.rep("..YY", 100))
end

do --- sub trim moonjit/moonjit#86
local s = "\n \t\tfoo bar\t "
assert(s:gsub("^%s*(.-)%s*$", "%1") == "foo bar")
end

0 comments on commit a15d664

Please sign in to comment.