mirror of
https://github.com/nushell/nushell.git
synced 2025-08-15 14:03:11 +02:00
Requested changes
This commit is contained in:
committed by
Simon Curtis
parent
ced3866916
commit
946da5ea5f
@ -162,17 +162,15 @@ pub fn check_example_evaluates_to_expected_output(
|
||||
if let Some(expected) = example.result.as_ref() {
|
||||
let expected = DebuggableValue(expected);
|
||||
let result = DebuggableValue(&result);
|
||||
if result != expected {
|
||||
assert_eq!(
|
||||
result,
|
||||
expected,
|
||||
"\x1b[31mError:\x1b[0m The result of example \x1b[34m'{}'\x1b[0m for the command \x1b[34m'{}'\x1b[0m differs from the expected value.\n\nExpected: {:?}\nActual: {:?}\n",
|
||||
example.description,
|
||||
cmd_name,
|
||||
expected,
|
||||
result,
|
||||
);
|
||||
}
|
||||
assert_eq!(
|
||||
result,
|
||||
expected,
|
||||
"Error: The result of example '{}' for the command '{}' differs from the expected value.\n\nExpected: {:?}\nActual: {:?}\n",
|
||||
example.description,
|
||||
cmd_name,
|
||||
expected,
|
||||
result,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user