mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-28 08:14:59 +00:00
feat: Add support for ! and ? action comments
This commit is contained in:
parent
b16ba547ab
commit
11512c6281
3 changed files with 16 additions and 8 deletions
|
@ -32,7 +32,7 @@ def test_ai_comment_pattern():
|
|||
f"Expected {py_expected} unique AI comments in Python fixture, found"
|
||||
f" {len(unique_py_comments)}"
|
||||
)
|
||||
assert py_has_bang, "Expected at least one bang (!) comment in Python fixture"
|
||||
assert py_has_bang == "!", "Expected at least one bang (!) comment in Python fixture"
|
||||
|
||||
# Test JavaScript fixture
|
||||
js_path = fixtures_dir / "watch.js"
|
||||
|
@ -41,18 +41,18 @@ def test_ai_comment_pattern():
|
|||
assert (
|
||||
len(js_lines) == js_expected
|
||||
), f"Expected {js_expected} AI comments in JavaScript fixture, found {len(js_lines)}"
|
||||
assert js_has_bang, "Expected at least one bang (!) comment in JavaScript fixture"
|
||||
assert js_has_bang == "!", "Expected at least one bang (!) comment in JavaScript fixture"
|
||||
|
||||
# Test watch_question.js fixture
|
||||
question_js_path = fixtures_dir / "watch_question.js"
|
||||
question_js_lines, question_js_comments, question_js_has_bang = watcher.get_ai_comments(
|
||||
str(question_js_path)
|
||||
)
|
||||
question_js_expected = 5
|
||||
question_js_expected = 6
|
||||
assert len(question_js_lines) == question_js_expected, (
|
||||
f"Expected {question_js_expected} AI comments in watch_question.js fixture, found"
|
||||
f" {len(question_js_lines)}"
|
||||
)
|
||||
assert (
|
||||
question_js_has_bang
|
||||
question_js_has_bang == "?"
|
||||
), "Expected at least one bang (!) comment in watch_question.js fixture"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue