|
BashSpark
|
Performs a test. Returns through status code. More...
#include <command_test.h>


Public Member Functions | |
| command_test () | |
| Constructs command. | |
| shell_status | run (const std::span< const std::string > &vArgs, shell_session &oSession) const override |
| Performs a test. | |
| virtual void | msg_error_test (std::ostream &oStdErr, shell_status nStatus) const |
| Displays the error message for test errors. | |
Public Member Functions inherited from bs::command | |
| command (std::string sName) | |
| Construct a command with a given name. | |
| virtual | ~command ()=default |
| Virtual destructor. | |
| std::string | get_name () const |
| Get the command name (copy). | |
| const std::string & | get_name_ref () const noexcept |
| Get the command name (reference). | |
Performs a test. Returns through status code.
Syntax: test args Syntax: test args
Capabilities:
Possible outputs:
bs::shell_status::SHELL_SUCCESSbs::shell_status::SHELL_CMD_TEST_FALSEbs::shell_status::SHELL_CMD_ERROR_TEST_UNCLOSED_PARENTHESISbs::shell_status::SHELL_CMD_ERROR_TEST_MALFORMED_EXPRESSIONbs::shell_status::SHELL_CMD_ERROR_TEST_MALFORMED_REGEX
|
virtual |
Displays the error message for test errors.
Can be overwritten with custom behaviour.
| oStdErr | Error output stream |
| nStatus | Status code |
|
overridevirtual |
Performs a test.
| vArgs | Arguments for the command. |
| oSession | The shell session context. |
Implements bs::command.