Skip to content

Commit

Permalink
Exercise string concat some more
Browse files Browse the repository at this point in the history
  • Loading branch information
corsix committed Oct 12, 2016
1 parent e7b029b commit 071f050
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/lang/concat.lua
Original file line number Diff line number Diff line change
Expand Up @@ -99,3 +99,14 @@ do --- Sink into side-exit
end
assert(z == "ab200")
end

do --- Very long strings
for i, s in ipairs{"a", "bc", "def"} do
for n = 1, 20 do
s = s .. s
end
assert(#s == 2^20*i)
assert(s:sub(1, 6) == s:sub(7, 12))
assert(s:sub(1, 6) == s:sub(-6, -1))
end
end

0 comments on commit 071f050

Please sign in to comment.