-
Notifications
You must be signed in to change notification settings - Fork 108
fix: files filter with #991
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -253,4 +253,77 @@ public void testJsonlSavesFileFilter() throws Exception { | |||||
|
|
||||||
| verifyNoMoreInteractions(files); | ||||||
| } | ||||||
|
|
||||||
| @Test | ||||||
| public void testJsonlSavesFileFilter2() throws Exception { | ||||||
| ProjectProperties pb = NewProjectPropertiesUtilBuilder.minimalBuilt().build(); | ||||||
|
|
||||||
| // Build project with one file (id=101) | ||||||
|
||||||
| // Build project with one file (id=101) | |
| // Build project with two files (id=101 and id=102) |
Copilot
AI
Feb 24, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The source string ss2 is created with fileId=101L (the last parameter in setIdentifiers), but it's being returned by the mock when querying for source strings from file 102L. This is inconsistent.
Since the test is checking that both files (101 and 102) are processed when matching the filter /[test.Folder dev]/**/*.php, the source strings should have the correct fileId to reflect which file they belong to. Update ss2 to use fileId=102L instead of 101L.
| .setIdentifiers(702L, "the-text2", "manual\n\n✨ AI Context\nai-content2\n✨ 🔚", "the.key2", 101L) | |
| .setIdentifiers(702L, "the-text2", "manual\n\n✨ AI Context\nai-content2\n✨ 🔚", "the.key2", 102L) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test method name
testJsonlSavesFileFilter2is not descriptive. It should clearly indicate what specific scenario is being tested. Consider renaming it to something liketestJsonlSavesFileFilterWithBracketsInFolderNamesortestJsonlSavesFileFilterWithSpecialCharactersInPathto make the test's purpose immediately clear.