mirror of
https://github.com/nushell/nushell.git
synced 2025-05-07 19:44:25 +02:00
Tests help, apparently. Windows has issues
On windows, .nu-env is not applied immediately after running autoenv trust. You have to cd out of the directory for it to work.
This commit is contained in:
parent
1729058352
commit
0e80082c3c
@ -1,6 +1,6 @@
|
|||||||
use nu_test_support::fs::Stub::EmptyFile;
|
use nu_test_support::fs::Stub::EmptyFile;
|
||||||
use nu_test_support::fs::Stub::FileWithContentToBeTrimmed;
|
|
||||||
use nu_test_support::fs::Stub::FileWithContent;
|
use nu_test_support::fs::Stub::FileWithContent;
|
||||||
|
use nu_test_support::fs::Stub::FileWithContentToBeTrimmed;
|
||||||
use nu_test_support::nu;
|
use nu_test_support::nu;
|
||||||
use nu_test_support::pipeline;
|
use nu_test_support::pipeline;
|
||||||
use nu_test_support::playground::Playground;
|
use nu_test_support::playground::Playground;
|
||||||
@ -46,6 +46,7 @@ fn autoenv() {
|
|||||||
".nu-env",
|
".nu-env",
|
||||||
r#"[env]
|
r#"[env]
|
||||||
testkey = "testvalue"
|
testkey = "testvalue"
|
||||||
|
|
||||||
[scriptvars]
|
[scriptvars]
|
||||||
myscript = "echo 'myval'"
|
myscript = "echo 'myval'"
|
||||||
|
|
||||||
@ -72,7 +73,6 @@ fn autoenv() {
|
|||||||
r#"autoenv trust
|
r#"autoenv trust
|
||||||
echo $nu.env.testkey"#
|
echo $nu.env.testkey"#
|
||||||
);
|
);
|
||||||
assert_eq!(actual.out, "a");
|
|
||||||
assert!(actual.out.ends_with("testvalue"));
|
assert!(actual.out.ends_with("testvalue"));
|
||||||
|
|
||||||
// Make sure script keys are set
|
// Make sure script keys are set
|
||||||
|
Loading…
Reference in New Issue
Block a user