add -p argument to debug single paragraph, fix issues, sorry for the large commit...
Some checks failed
CI/CD Pipeline / test (push) Failing after 1m31s
Some checks failed
CI/CD Pipeline / test (push) Failing after 1m31s
This commit is contained in:
@@ -122,11 +122,16 @@ mod tests {
|
||||
|
||||
let actual = &builder.history;
|
||||
|
||||
let expected = fs::read_to_string(&expected_path)
|
||||
.unwrap_or_else(|_| panic!("Could not read file {expected_path}."));
|
||||
let expected = expected.trim().split('\n').collect::<Vec<&str>>();
|
||||
|
||||
assert_eq!(actual, &expected);
|
||||
match fs::read_to_string(&expected_path) {
|
||||
Ok(expected) => {
|
||||
let e = expected.trim().split('\n').collect::<Vec<&str>>();
|
||||
assert_eq!(actual, &e);
|
||||
}
|
||||
Err(_) => {
|
||||
let to_write = actual.join("\n");
|
||||
fs::write(expected_path, to_write).expect("Unable to write file");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user