mirror of
https://github.com/nushell/nushell
synced 2024-12-26 13:03:07 +00:00
Make tests work from directory names with spaces (#1325)
This commit is contained in:
parent
6427ea2331
commit
49a1385543
4 changed files with 5 additions and 5 deletions
|
@ -21,7 +21,7 @@ macro_rules! nu {
|
||||||
|
|
||||||
let commands = &*format!(
|
let commands = &*format!(
|
||||||
"
|
"
|
||||||
cd {}
|
cd \"{}\"
|
||||||
{}
|
{}
|
||||||
exit",
|
exit",
|
||||||
$crate::fs::in_directory($cwd),
|
$crate::fs::in_directory($cwd),
|
||||||
|
@ -103,7 +103,7 @@ macro_rules! nu_error {
|
||||||
|
|
||||||
let commands = &*format!(
|
let commands = &*format!(
|
||||||
"
|
"
|
||||||
cd {}
|
cd \"{}\"
|
||||||
{}
|
{}
|
||||||
exit",
|
exit",
|
||||||
$crate::fs::in_directory($cwd),
|
$crate::fs::in_directory($cwd),
|
||||||
|
|
|
@ -24,7 +24,7 @@ fn filesystem_change_from_current_directory_using_absolute_path() {
|
||||||
let actual = nu!(
|
let actual = nu!(
|
||||||
cwd: dirs.test(),
|
cwd: dirs.test(),
|
||||||
r#"
|
r#"
|
||||||
cd {}
|
cd "{}"
|
||||||
pwd | echo $it
|
pwd | echo $it
|
||||||
"#,
|
"#,
|
||||||
dirs.formats()
|
dirs.formats()
|
||||||
|
|
|
@ -8,7 +8,7 @@ fn copies_a_file() {
|
||||||
Playground::setup("cp_test_1", |dirs, _| {
|
Playground::setup("cp_test_1", |dirs, _| {
|
||||||
nu!(
|
nu!(
|
||||||
cwd: dirs.root(),
|
cwd: dirs.root(),
|
||||||
"cp {} cp_test_1/sample.ini",
|
"cp \"{}\" cp_test_1/sample.ini",
|
||||||
dirs.formats().join("sample.ini")
|
dirs.formats().join("sample.ini")
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -37,7 +37,7 @@ fn writes_out_csv() {
|
||||||
|
|
||||||
nu!(
|
nu!(
|
||||||
cwd: dirs.root(),
|
cwd: dirs.root(),
|
||||||
"open {}/cargo_sample.toml | get package | save save_test_2/cargo_sample.csv",
|
"open \"{}/cargo_sample.toml\" | get package | save save_test_2/cargo_sample.csv",
|
||||||
dirs.formats()
|
dirs.formats()
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue