Add 12 new script tests covering error cases for existing commands (create, update, show, close, dep, delete) and missing command coverage (comments, label, search, config, lint, delete). All new tests pass; 6 pre-existing script test failures remain unchanged. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
24 lines
606 B
Text
24 lines
606 B
Text
# Test bd comments command
|
|
|
|
bd init --prefix test
|
|
|
|
# Create an issue
|
|
bd create 'Issue for comments'
|
|
cp stdout issue.txt
|
|
exec sh -c 'grep -oE "test-[a-z0-9]+" issue.txt > id.txt'
|
|
|
|
# Add a comment
|
|
exec sh -c 'bd comments add $(cat id.txt) "This is a test comment"'
|
|
stdout 'Comment added'
|
|
|
|
# List comments
|
|
exec sh -c 'bd comments $(cat id.txt)'
|
|
stdout 'This is a test comment'
|
|
|
|
# Add another comment with author
|
|
exec sh -c 'bd comments add $(cat id.txt) "Second comment" --author tester'
|
|
stdout 'Comment added'
|
|
|
|
# Comments on nonexistent issue should fail
|
|
! bd comments nonexistent-id
|
|
stderr 'no issue found'
|