mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 09:15:42 +02:00
This reverts commit 5002d87af4
from pr
#13958
It seems that something unexpected happened from
[@ealap](https://github.com/ealap)'s report. Thanks!
Reopen: #13425
This commit is contained in:
@ -308,47 +308,3 @@ fn can_use_sub_subname_from_submodule() {
|
||||
let actual = nu!(inp);
|
||||
assert_eq!(actual.out, "bar")
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_use_with_printing_file_pwd() {
|
||||
Playground::setup("use_with_printing_file_pwd", |dirs, nu| {
|
||||
let file = dirs.test().join("mod.nu");
|
||||
nu.with_files(&[FileWithContent(
|
||||
file.as_os_str().to_str().unwrap(),
|
||||
r#"
|
||||
export-env {
|
||||
print $env.FILE_PWD
|
||||
}
|
||||
"#,
|
||||
)]);
|
||||
|
||||
let actual = nu!(
|
||||
cwd: dirs.test(),
|
||||
"use ."
|
||||
);
|
||||
|
||||
assert_eq!(actual.out, dirs.test().to_string_lossy());
|
||||
});
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_use_with_printing_current_file() {
|
||||
Playground::setup("use_with_printing_current_file", |dirs, nu| {
|
||||
let file = dirs.test().join("mod.nu");
|
||||
nu.with_files(&[FileWithContent(
|
||||
file.as_os_str().to_str().unwrap(),
|
||||
r#"
|
||||
export-env {
|
||||
print $env.CURRENT_FILE
|
||||
}
|
||||
"#,
|
||||
)]);
|
||||
|
||||
let actual = nu!(
|
||||
cwd: dirs.test(),
|
||||
"use ."
|
||||
);
|
||||
|
||||
assert_eq!(actual.out, dirs.test().join("mod.nu").to_string_lossy());
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user