mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-22 13:25:00 +00:00
Add test case for check_for_urls
to handle repeated URLs
This commit is contained in:
parent
a03506046c
commit
a0eadb62c5
1 changed files with 6 additions and 0 deletions
|
@ -689,6 +689,12 @@ two
|
||||||
result = coder.check_for_urls(no_url_input)
|
result = coder.check_for_urls(no_url_input)
|
||||||
self.assertEqual(result, no_url_input)
|
self.assertEqual(result, no_url_input)
|
||||||
|
|
||||||
|
# Test case with the same URL appearing multiple times
|
||||||
|
repeated_url_input = "Check https://example.com, then https://example.com again, and https://example.com one more time"
|
||||||
|
result = coder.check_for_urls(repeated_url_input)
|
||||||
|
self.assertEqual(result.count("https://example.com"), 1)
|
||||||
|
self.assertIn("https://example.com", result)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
unittest.main()
|
unittest.main()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue