1
Fork 0
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:
Terts Diepraam 2021-05-29 14:30:30 +02:00
parent 844e318a67
commit 0487360507
3 changed files with 13 additions and 12 deletions

View file

@ -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);
}