takeLine() bug fix

This commit is contained in:
2019-03-16 19:50:20 -06:00
parent 901f6852ea
commit e446256c97
5 changed files with 29 additions and 11 deletions

View File

@@ -70,6 +70,8 @@ class HankBufferTest extends utest.Test {
assertPosition();
HankAssert.equals(Some('Line of text.'), file.peekLine());
assertPosition();
file.takeLine();
HankAssert.equals(Some('Line of text without a comment.'), file.peekLine());
}
function testTakeLine() {

View File

@@ -23,6 +23,8 @@ class ParserTest extends utest.Test {
ast = parser.parseFile('examples/parsing/output.hank');
assertNextExpr(EOutput(new Output([Text("This file contains test cases for output expression parsing.")])));
assertNextExpr(EOutput(new Output([Text("A line won't be interrupted or anything.")])));
assertNextExpr(EOutput(new Output([Text("Multiline comments an output expression. This should parse as one line of output.")])));
assertNextExpr(EOutput(new Output([Text("Comments at the end of lines won't parse as part of the Output.")])));
}