Skip to content

Commit c34fef1

Browse files
committed
Adjust integration tests after path changes and generating file with global usings
1 parent d725bd9 commit c34fef1

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
| Program.cs |
22
| Views/Home/Index.cshtml |
33
| _semmle_code_target_codeql_csharp_integration_tests_ql_csharp_ql_integration_tests_all_platforms_cshtml_standalone_Views_Home_Index_cshtml.g.cs |
4+
| test-db/working/implicitUsings/GlobalUsings.g.cs |

csharp/ql/integration-tests/all-platforms/cshtml_standalone/Files.ql

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
import csharp
22

33
private string getPath(File f) {
4-
result = f.getRelativePath()
4+
result = f.getRelativePath() and
5+
not exists(
6+
result
7+
.indexOf("_semmle_code_target_codeql_csharp_integration_tests_ql_csharp_ql_integration_tests_all_platforms_cshtml_standalone_")
8+
)
59
or
6-
not exists(f.getRelativePath()) and
710
exists(int index |
811
index =
9-
f.getBaseName()
12+
f.getRelativePath()
1013
.indexOf("_semmle_code_target_codeql_csharp_integration_tests_ql_csharp_ql_integration_tests_all_platforms_cshtml_standalone_") and
11-
result = f.getBaseName().substring(index, f.getBaseName().length())
14+
result = f.getRelativePath().substring(index, f.getRelativePath().length())
1215
)
1316
}
1417

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
| Program.cs:0:0:0:0 | Program.cs |
2+
| test-db/working/implicitUsings/GlobalUsings.g.cs:0:0:0:0 | test-db/working/implicitUsings/GlobalUsings.g.cs |

0 commit comments

Comments
 (0)