Skip to main content

Crate clitest_lib

Crate clitest_lib 

Source
Expand description

This crate provides the core functionality for the clitest crate as a library.

Modules§

command
failure
output
parser
script
term
util

Macros§

clitest
Generate #[test] functions from inline clitest scripts. The PWD for the script is set to the current directory, which for cargo test is the root of the crate.
cprint
cprintln
cprintln_rule
cwrite
cwriteln
cwriteln_rule
Print a rule of dashes, optionally with an embedded message.
println

Structs§

RunError
Error returned by try_run_captured and try_run_file_captured.

Functions§

run
Parse and run a clitest script string. Output goes to stdout. Panics on failure.
run_captured
Parse and run a clitest script string. Returns captured output. Panics on failure.
run_file
Parse and run a clitest script file. Output goes to stdout. Panics on failure.
run_file_captured
Parse and run a clitest script file. Returns captured output. Panics on failure.
run_with_path
Parse and run a clitest script string. Output goes to stdout. Panics on failure.
run_with_path_captured
Parse and run a clitest script string. Returns captured output. Panics on failure.
try_run_captured
Parse and run a clitest script string. Returns Ok(output) on success, or Err(RunError) with both the error message and captured output on failure.
try_run_file_captured
Parse and run a clitest script file. Returns Ok(output) on success, or Err(RunError) with the error message and captured output on failure.