mirror of
https://github.com/nushell/nushell.git
synced 2025-04-18 18:28:19 +02:00
Test sample changed to check behavior with strings on different operating systems.
This commit is contained in:
parent
cee2f5207e
commit
fc38603de8
@ -112,7 +112,7 @@ fn find_and_replaces() {
|
|||||||
"sample.toml",
|
"sample.toml",
|
||||||
r#"
|
r#"
|
||||||
[fortune.teller]
|
[fortune.teller]
|
||||||
phone = "1-800 KATZ"
|
phone = "1-800-KATZ"
|
||||||
"#,
|
"#,
|
||||||
)]);
|
)]);
|
||||||
|
|
||||||
@ -122,7 +122,7 @@ fn find_and_replaces() {
|
|||||||
"open sample.toml | str fortune.teller.phone --find-replace KATZ \"5289\" | get fortune.teller.phone | echo $it"
|
"open sample.toml | str fortune.teller.phone --find-replace KATZ \"5289\" | get fortune.teller.phone | echo $it"
|
||||||
);
|
);
|
||||||
|
|
||||||
assert_eq!(output, "1-800 5289");
|
assert_eq!(output, "1-800-5289");
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
@ -132,7 +132,7 @@ fn find_and_replaces_without_passing_field() {
|
|||||||
"sample.toml",
|
"sample.toml",
|
||||||
r#"
|
r#"
|
||||||
[fortune.teller]
|
[fortune.teller]
|
||||||
phone = "1-800 KATZ"
|
phone = "1-800-KATZ"
|
||||||
"#,
|
"#,
|
||||||
)],
|
)],
|
||||||
);
|
);
|
||||||
@ -143,5 +143,5 @@ fn find_and_replaces_without_passing_field() {
|
|||||||
"open sample.toml | get fortune.teller.phone | str --find-replace KATZ \"5289\" | echo $it"
|
"open sample.toml | get fortune.teller.phone | str --find-replace KATZ \"5289\" | echo $it"
|
||||||
);
|
);
|
||||||
|
|
||||||
assert_eq!(output, "1-800 5289");
|
assert_eq!(output, "1-800-5289");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user