mirror of
https://github.com/nushell/nushell.git
synced 2024-11-22 08:23:24 +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() {
|
||||
Playground::setup("autoenv_test_1", |dirs, sandbox| {
|
||||
sandbox.mkdir("foo/bar");
|
||||
sandbox.mkdir("foob");
|
||||
sandbox.with_files(vec![
|
||||
FileWithContent(
|
||||
".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
|
||||
let actual = nu!(
|
||||
cwd: dirs.test(),
|
||||
|
Loading…
Reference in New Issue
Block a user