mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-31 21:17:46 +00:00
pr: make tests compile again
This commit is contained in:
parent
844e318a67
commit
0487360507
3 changed files with 13 additions and 12 deletions
|
@ -205,8 +205,8 @@ impl CmdResult {
|
|||
}
|
||||
/// like stdout_is_fixture(...), but replaces the data in fixture file based on values provided in template_vars
|
||||
/// command output
|
||||
pub fn stdout_is_templated_fixture<T: AsRef<OsStr>>(&self, file_rel_path: T, template_vars: Vec<(&String, &String)>) -> Box<&CmdResult> {
|
||||
let mut contents = read_scenario_fixture(&self.tmpd, file_rel_path);
|
||||
pub fn stdout_is_templated_fixture<T: AsRef<OsStr>>(&self, file_rel_path: T, template_vars: Vec<(&String, &String)>) -> &CmdResult {
|
||||
let mut contents = String::from_utf8(read_scenario_fixture(&self.tmpd, file_rel_path)).unwrap();
|
||||
for kv in template_vars {
|
||||
contents = contents.replace(kv.0, kv.1);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue