Skip to content

Commit

Permalink
Add test for fixed parsing of goto.
Browse files Browse the repository at this point in the history
Also update test for changes to the table library.
  • Loading branch information
DemiMarie committed Mar 6, 2017
1 parent 014708b commit 52015c1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions test/lang/goto.lua
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ do --- Basic goto and label semantics.
expect("goto a; do ::a:: end", "'a'")
expect("break", "break")
expect("if x then break end", "break")
expect("repeat goto a break until true", "undefined label 'a'")

-- Error: goto into variable scope.
expect("goto a; local x; ::a:: local y", "'x'")
Expand Down
2 changes: 1 addition & 1 deletion test/lib/contents.lua
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ do --- 5.2 string +lua>=5.2
end

do --- pre-5.2 table +lua<5.2
check(table, "concat:foreach:foreachi:getn:insert:maxn:remove:sort", "pack:unpack:setn:new")
check(table, "concat:foreach:foreachi:getn:insert:maxn:move:remove:sort", "pack:unpack:setn:new")
end

do --- 5.2 table +lua>=5.2
Expand Down

0 comments on commit 52015c1

Please sign in to comment.