mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 15:25:06 +02:00
allow for $in
to affect environment (#6649)
* allow for `$in` to affect environment * fix for vars, overlays, env_hidden * fmt * carry over variables properly * add test * modify name, remove redundant * fmt
This commit is contained in:
@ -3,6 +3,20 @@ use nu_test_support::nu;
|
||||
use nu_test_support::playground::Playground;
|
||||
use std::path::PathBuf;
|
||||
|
||||
#[test]
|
||||
fn cd_works_with_in_var() {
|
||||
Playground::setup("cd_test_1", |dirs, _| {
|
||||
let actual = nu!(
|
||||
cwd: dirs.root(),
|
||||
r#"
|
||||
"cd_test_1" | cd $in; $env.PWD | path split | last
|
||||
"#
|
||||
);
|
||||
|
||||
assert_eq!("cd_test_1", actual.out);
|
||||
})
|
||||
}
|
||||
|
||||
// FIXME: jt: needs more work
|
||||
#[ignore]
|
||||
#[test]
|
||||
|
Reference in New Issue
Block a user