Skip to content

Commit 6e3d014

Browse files
Add test cases for paths with the same prefix
1 parent 300503e commit 6e3d014

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

extensions/ql-vscode/test/unit-tests/pure/files.test.ts

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,22 @@ describe("containsPath", () => {
236236
platform: "linux",
237237
expected: false,
238238
},
239+
{
240+
parent:
241+
"/home/github/projects/vscode-codeql-starter/codeql-custom-queries-java",
242+
child:
243+
"/home/github/projects/vscode-codeql-starter/codeql-custom-queries-javascript",
244+
platform: "linux",
245+
expected: false,
246+
},
247+
{
248+
parent:
249+
"/home/github/projects/vscode-codeql-starter/codeql-custom-queries-java",
250+
child:
251+
"/home/github/projects/vscode-codeql-starter/codeql-custom-queries-javascript/example.ql",
252+
platform: "linux",
253+
expected: false,
254+
},
239255
{
240256
parent:
241257
"C:/Users/github/projects/vscode-codeql-starter/codeql-custom-queries-javascript",
@@ -284,6 +300,22 @@ describe("containsPath", () => {
284300
platform: "win32",
285301
expected: false,
286302
},
303+
{
304+
parent:
305+
"C:/Users/github/projects/vscode-codeql-starter/codeql-custom-queries-java",
306+
child:
307+
"C:/Users/github/projects/vscode-codeql-starter/codeql-custom-queries-javascript",
308+
platform: "win32",
309+
expected: false,
310+
},
311+
{
312+
parent:
313+
"C:/Users/github/projects/vscode-codeql-starter/codeql-custom-queries-java",
314+
child:
315+
"C:/Users/github/projects/vscode-codeql-starter/codeql-custom-queries-javascript/example.ql",
316+
platform: "win32",
317+
expected: false,
318+
},
287319
];
288320

289321
test.each(testCases)(

0 commit comments

Comments
 (0)