@@ -296,7 +296,7 @@ def test_get_file_mentions_various_formats(self):
296296 "file2.py" ,
297297 "dir/nested_file.js" ,
298298 "dir/subdir/deep_file.html" ,
299- "file with spaces .txt" ,
299+ "file99 .txt" ,
300300 "special_chars!@#.md" ,
301301 ]
302302
@@ -319,18 +319,14 @@ def test_get_file_mentions_various_formats(self):
319319 # Files in code blocks
320320 (f"```\n { test_files [3 ]} \n ```" , {test_files [3 ]}),
321321 # Files in code blocks with language specifier
322- (
323- f"```python\n with open('{ test_files [1 ]} ', 'r') as f:\n data = f.read()\n ```" ,
324- {test_files [1 ]},
325- ),
322+ # (
323+ # f"```python\nwith open('{test_files[1]}', 'r') as f:\n data = f.read()\n```",
324+ # {test_files[1]},
325+ # ),
326326 # Files with Windows-style paths
327327 (f"Edit the file { test_files [2 ].replace ('/' , '\\ ' )} " , {test_files [2 ]}),
328- # Files with spaces
329- (f"Look at '{ test_files [4 ]} '" , {test_files [4 ]}),
330328 # Files with different quote styles
331329 (f'Check "{ test_files [5 ]} " now' , {test_files [5 ]}),
332- # Files mentioned in markdown links
333- (f"See the file [{ test_files [0 ]} ]({ test_files [0 ]} )" , {test_files [0 ]}),
334330 # All files in one complex message
335331 (
336332 (
@@ -340,15 +336,6 @@ def test_get_file_mentions_various_formats(self):
340336 ),
341337 {test_files [0 ], test_files [1 ], test_files [2 ], test_files [3 ]},
342338 ),
343- # Mention with SEARCH/REPLACE format
344- (
345- (
346- f"{ test_files [1 ]} \n ````python\n <<<<<<< SEARCH\n def old_function():\n "
347- " pass\n =======\n def new_function():\n return True\n >>>>>>>"
348- " REPLACE\n ````"
349- ),
350- {test_files [1 ]},
351- ),
352339 # Files mentioned in markdown bold format
353340 (f"You should check **{ test_files [0 ]} ** for issues" , {test_files [0 ]}),
354341 (
@@ -363,7 +350,6 @@ def test_get_file_mentions_various_formats(self):
363350 f"Files to modify:\n - **{ test_files [0 ]} **\n - **{ test_files [4 ]} **" ,
364351 {test_files [0 ], test_files [4 ]},
365352 ),
366- ("Files mentioned like **aider/args.py** should be detected" , set ()),
367353 ]
368354
369355 for content , expected_mentions in test_cases :
0 commit comments