diff --git a/src/test/java/intellij_awk/AwkInspectionTests.java b/src/test/java/intellij_awk/AwkInspectionTests.java index 135fae8..fefa93e 100644 --- a/src/test/java/intellij_awk/AwkInspectionTests.java +++ b/src/test/java/intellij_awk/AwkInspectionTests.java @@ -324,6 +324,14 @@ public void testFuncRefToPreventUnusedFunc3_1() { checkByFile(unusedFunction); } + public void testFuncRefToPreventUnusedFunc4() { + checkByFileNoProblemAtCaret(unusedFunction); + } + + public void testFuncRefToPreventUnusedFunc4_1() { + checkByFile(unusedFunction); + } + @Override protected String getTestDataPath() { return "src/test/testData/inspection"; diff --git a/src/test/testData/inspection/funcRefToPreventUnusedFunc4.awk b/src/test/testData/inspection/funcRefToPreventUnusedFunc4.awk new file mode 100644 index 0000000..49162f4 --- /dev/null +++ b/src/test/testData/inspection/funcRefToPreventUnusedFunc4.awk @@ -0,0 +1,7 @@ +BEGIN { + b("fname") +} + +function b(f) { @f() } + +function fname() {} \ No newline at end of file diff --git a/src/test/testData/inspection/funcRefToPreventUnusedFunc4_1.awk b/src/test/testData/inspection/funcRefToPreventUnusedFunc4_1.awk new file mode 100644 index 0000000..405bf57 --- /dev/null +++ b/src/test/testData/inspection/funcRefToPreventUnusedFunc4_1.awk @@ -0,0 +1,5 @@ +BEGIN { + length("fname") +} + +function fname() {} \ No newline at end of file diff --git a/src/test/testData/inspection/funcRefToPreventUnusedFunc4_1After.awk b/src/test/testData/inspection/funcRefToPreventUnusedFunc4_1After.awk new file mode 100644 index 0000000..cb33394 --- /dev/null +++ b/src/test/testData/inspection/funcRefToPreventUnusedFunc4_1After.awk @@ -0,0 +1,5 @@ +BEGIN { + length("fname") +} + + \ No newline at end of file