mirror of
https://github.com/imjasonh/testscript-rs
synced 2026-07-18 14:46:25 +00:00
improve error messages with context (#13)
Signed-off-by: Jason Hall <jason@chainguard.dev>
This commit is contained in:
parent
38bef8a370
commit
3a8e953f70
5 changed files with 156 additions and 3 deletions
|
|
@ -138,7 +138,12 @@ exec echo "This should not run""#;
|
|||
|
||||
let result = run_test(&script_path);
|
||||
assert!(result.is_err(), "Skip test should have failed");
|
||||
assert!(result.unwrap_err().to_string().contains("SKIP"));
|
||||
|
||||
let error_msg = result.unwrap_err().to_string();
|
||||
println!("Skip error message: {}", error_msg);
|
||||
// The skip command should create a contextual error showing the skip line
|
||||
assert!(error_msg.contains("skip_test.txt"));
|
||||
assert!(error_msg.contains("skip \"This test should be skipped\""));
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue