Skip to content

Commit

Permalink
Should autocomplete variable in this case #207 : add failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
xonixx committed Dec 17, 2023
1 parent 5b5679b commit 788d782
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/test/java/intellij_awk/AwkCompletionTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -436,12 +436,14 @@ public void testGlobalVariableInAction2() {
checkCompletionAuto("{ Xxx=1 }\nXx<caret>", "{ Xxx=1 }\nXxx<caret>");
}
public void testGlobalVariableInAction3() {
checkCompletionAuto("/a/{ Xxx=1 } /b/{ Xx<caret> }", "/a/{ Xxx=1 } /b/{ Xxx<caret> }");
checkCompletionAuto("/a/{ xxx=1 } /b/{ xx<caret> }", "/a/{ xxx=1 } /b/{ xxx<caret> }");
}
public void testGlobalVariableInAction4() {
checkCompletionAuto("function f(){ Xxx=1 } { Xx<caret> }", "function f(){ Xxx=1 } { Xxx<caret> }");
}

public void testGlobalVariableInAction5_NotLocal() {
checkCompletionEmpty("function f(Xxx){ Xxx=1 } { Xx<caret> }");
}

private void checkFunctionArgs(String code, String fName, String expectedArgs) {
setupCode(code);
Expand Down

0 comments on commit 788d782

Please sign in to comment.