mirror of
https://github.com/leonvanzyl/autocoder.git
synced 2026-01-29 22:02:05 +00:00
test: add empty command name validation test for project config
Adds a test case to verify that empty command names are rejected in project-level allowed_commands.yaml, matching the behavior already tested for org-level config. Updates test count to 163. Addresses review feedback from leonvanzyl. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -455,6 +455,21 @@ commands:
|
|||||||
print(" FAIL: Non-allowed command 'rustc' should be blocked")
|
print(" FAIL: Non-allowed command 'rustc' should be blocked")
|
||||||
failed += 1
|
failed += 1
|
||||||
|
|
||||||
|
# Test 4: Empty command name is rejected
|
||||||
|
config_path.write_text("""version: 1
|
||||||
|
commands:
|
||||||
|
- name: ""
|
||||||
|
description: Empty name should be rejected
|
||||||
|
""")
|
||||||
|
result = load_project_commands(project_dir)
|
||||||
|
if result is None:
|
||||||
|
print(" PASS: Empty command name rejected in project config")
|
||||||
|
passed += 1
|
||||||
|
else:
|
||||||
|
print(" FAIL: Empty command name should be rejected in project config")
|
||||||
|
print(f" Got: {result}")
|
||||||
|
failed += 1
|
||||||
|
|
||||||
return passed, failed
|
return passed, failed
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user