Files
cleveragents-core/features/cli_coverage.feature

49 lines
1.7 KiB
Gherkin

Feature: CLI Main Coverage
As a developer
I want to ensure the CLI main module is properly tested
So that I have confidence in the application's entry points
Scenario: CLI commands execute successfully
When I run shell command "cleveragents --version"
Then the shell command should succeed
And the shell output should contain "1.0.0"
Scenario: CLI help displays correctly
When I call the main function directly with "--help"
Then it should return 0
Scenario: CLI info command runs
When I call the main function directly with "info"
Then it should return 0
Scenario: CLI diagnostics command runs
When I call the main function directly with "diagnostics"
Then it should return 0
Scenario: Invalid command returns error
When I call the main function directly with "invalid-command"
Then it should return 2
Scenario: Direct main function call with no args
When I call the main function directly with no args
Then it should return 0
Scenario: Direct main function call with version
When I call the main function directly with "--version"
Then it should return 0
Scenario: Direct main function call with help
When I call the main function directly with "--help"
Then it should return 0
Scenario: Direct main function call with bad command
When I call the main function directly with "bad-command"
Then it should return 2
Scenario: CLI handles keyboard interrupt
When I run a command that gets interrupted
Then it should handle the KeyboardInterrupt gracefully
Scenario: CLI handles system exit
When I run a command that calls sys.exit(1)
Then it should propagate the exit code correctly