Skip to content

Commit 27910b5

Browse files
committed
Add check for invalid syntax error squiggles
1 parent 52235ba commit 27910b5

File tree

1 file changed

+11
-4
lines changed
  • rascal-vscode-extension/src/test/vscode-suite

1 file changed

+11
-4
lines changed

rascal-vscode-extension/src/test/vscode-suite/dsl.test.ts

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -150,17 +150,24 @@ parameterizedDescribe(function (errorRecovery: boolean) {
150150
if (result && await ignoreFails(result.getTitle()) === file) {
151151
return result;
152152
}
153-
return undefined;
153+
return undefined! as TextEditor;
154154
}, Delays.normal, "Could not open file");
155155
expect(editor).to.not.be.undefined;
156156

157-
await editor!.setText(`begin
157+
await editor.setText(`begin
158158
declare
159159
a : natural;
160-
a := 2;
160+
a := 2
161161
end
162162
`, true);
163-
await ide.hasSyntaxHighlighting(editor!, Delays.slow);
163+
await ide.hasSyntaxHighlighting(editor, Delays.slow);
164+
165+
try {
166+
await editor.setTextAtLine(4, " a := ");
167+
await ide.hasErrorSquiggly(editor, Delays.slow);
168+
} finally {
169+
await ide.revertOpenChanges();
170+
}
164171
}).retries(2);
165172

166173
it("error recovery works", async function () {

0 commit comments

Comments
 (0)