mirror of
https://github.com/nushell/nushell.git
synced 2024-11-26 10:23:52 +01:00
Sibling dir test
This commit is contained in:
parent
72e4b856af
commit
016a328d32
@ -41,6 +41,7 @@ fn takes_rows_of_nu_value_strings_and_pipes_it_to_stdin_of_external() {
|
|||||||
fn autoenv() {
|
fn autoenv() {
|
||||||
Playground::setup("autoenv_test_1", |dirs, sandbox| {
|
Playground::setup("autoenv_test_1", |dirs, sandbox| {
|
||||||
sandbox.mkdir("foo/bar");
|
sandbox.mkdir("foo/bar");
|
||||||
|
sandbox.mkdir("foob");
|
||||||
sandbox.with_files(vec![
|
sandbox.with_files(vec![
|
||||||
FileWithContent(
|
FileWithContent(
|
||||||
".nu-env",
|
".nu-env",
|
||||||
@ -67,6 +68,16 @@ fn autoenv() {
|
|||||||
),
|
),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
//Going to sibling directory without passing parent should work.
|
||||||
|
let actual = nu!(
|
||||||
|
cwd: dirs.test(),
|
||||||
|
r#"autoenv trust foo
|
||||||
|
cd foob
|
||||||
|
cd ../foo
|
||||||
|
echo $nu.env.fookey"#
|
||||||
|
);
|
||||||
|
assert!(actual.out.ends_with("fooval"));
|
||||||
|
|
||||||
//Make sure basic keys are set
|
//Make sure basic keys are set
|
||||||
let actual = nu!(
|
let actual = nu!(
|
||||||
cwd: dirs.test(),
|
cwd: dirs.test(),
|
||||||
|
Loading…
Reference in New Issue
Block a user