Assertion condition Expected to find AVAILABLE COMMANDS from screen but was NAME
help - Display help about available commands
SYNOPSIS
help --command String[] --help
OPTIONS
--command or -C String[]
The command to obtain help for.
[Optional]
--help or -h
help for help
[Optional]
The test send the argument "help help" to shell, but it expects output from the "help" command.
If I run it interactive I see the difference:
shell:>help
help
AVAILABLE COMMANDS
Built-In Commands
help: Display help about available commands
stacktrace: Display the full stacktrace of the last error.
clear: Clear the shell screen.
quit, exit: Exit the shell.
history: Display or save the history of previously run commands
version: Show version info
script: Read and execute commands from a file.
shell:>
shell:>help help
help help
NAME
help - Display help about available commands
SYNOPSIS
help --command String[] --help
OPTIONS
--command or -C String[]
The command to obtain help for.
[Optional]
--help or -h
help for help
[Optional]
I have implemented the tests documented at Spring Shell Testing Basics .
The NonInteractiveTestSample fails for me:
The test send the argument "help help" to shell, but it expects output from the "help" command.
If I run it interactive I see the difference:
So in file TestingSnippets.java Line 74 it should be:
Then this test succeed.
Tested with: