mirror of
https://github.com/Stone-Red-Code/YesNt-Interpreter.git
synced 2026-09-04 00:56:31 +02:00
Add tests for loop exit, local/global scope, concurrency, and string escapes
This commit is contained in:
@@ -200,6 +200,24 @@ public class CodeFlowTests
|
||||
YesNtAssert.IsLastLineEqual(lines, "ok");
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void GotoInsideLoopExitsLoopTest()
|
||||
{
|
||||
List<string> lines =
|
||||
[
|
||||
"var hit = no",
|
||||
"while 1 == 1:",
|
||||
"var hit = yes",
|
||||
"goto done",
|
||||
"end_while",
|
||||
"label done:",
|
||||
"${hit}"
|
||||
];
|
||||
|
||||
YesNtAssert.IsLastLineEqual(lines, "yes");
|
||||
}
|
||||
|
||||
|
||||
[TestMethod]
|
||||
public void LabelWithoutColonFailsTest()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user