mirror of
https://github.com/uutils/coreutils
synced 2024-12-13 14:52:41 +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
19
Cargo.lock
generated
19
Cargo.lock
generated
|
@ -206,6 +206,7 @@ dependencies = [
|
||||||
name = "coreutils"
|
name = "coreutils"
|
||||||
version = "0.0.6"
|
version = "0.0.6"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
"chrono",
|
||||||
"conv",
|
"conv",
|
||||||
"filetime",
|
"filetime",
|
||||||
"glob 0.3.0",
|
"glob 0.3.0",
|
||||||
|
@ -2152,16 +2153,16 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "uu_pr"
|
name = "uu_pr"
|
||||||
version = "0.0.4"
|
version = "0.0.6"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"chrono 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
"chrono",
|
||||||
"getopts 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)",
|
"getopts",
|
||||||
"itertools 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"itertools 0.10.0",
|
||||||
"quick-error 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
"quick-error",
|
||||||
"regex 1.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
"regex",
|
||||||
"time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)",
|
"time",
|
||||||
"uucore 0.0.7",
|
"uucore",
|
||||||
"uucore_procs 0.0.5",
|
"uucore_procs",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "uu_pr"
|
name = "uu_pr"
|
||||||
version = "0.0.4"
|
version = "0.0.6"
|
||||||
authors = ["uutils developers"]
|
authors = ["uutils developers"]
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
description = "pr ~ (uutils) convert text files for printing"
|
description = "pr ~ (uutils) convert text files for printing"
|
||||||
|
|
|
@ -205,8 +205,8 @@ impl CmdResult {
|
||||||
}
|
}
|
||||||
/// like stdout_is_fixture(...), but replaces the data in fixture file based on values provided in template_vars
|
/// like stdout_is_fixture(...), but replaces the data in fixture file based on values provided in template_vars
|
||||||
/// command output
|
/// command output
|
||||||
pub fn stdout_is_templated_fixture<T: AsRef<OsStr>>(&self, file_rel_path: T, template_vars: Vec<(&String, &String)>) -> Box<&CmdResult> {
|
pub fn stdout_is_templated_fixture<T: AsRef<OsStr>>(&self, file_rel_path: T, template_vars: Vec<(&String, &String)>) -> &CmdResult {
|
||||||
let mut contents = read_scenario_fixture(&self.tmpd, file_rel_path);
|
let mut contents = String::from_utf8(read_scenario_fixture(&self.tmpd, file_rel_path)).unwrap();
|
||||||
for kv in template_vars {
|
for kv in template_vars {
|
||||||
contents = contents.replace(kv.0, kv.1);
|
contents = contents.replace(kv.0, kv.1);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue