mirror of
https://github.com/nushell/nushell.git
synced 2024-11-28 11:24:09 +01:00
adjust hiding relative test case
This commit is contained in:
parent
3f7b5657c9
commit
4369af6d05
@ -336,7 +336,7 @@ fn hides_alias_import_then_reimports() -> TestResult {
|
|||||||
#[test]
|
#[test]
|
||||||
fn hides_env_import_1() -> TestResult {
|
fn hides_env_import_1() -> TestResult {
|
||||||
fail_test(
|
fail_test(
|
||||||
r#"module spam { export env foo { "foo" } }; use spam; hide-env 'spam foo'; $env.'spam foo'"#,
|
r#"module spam { export-env { let-env foo = "foo" } }; overlay use spam; hide-env foo; $env.foo"#,
|
||||||
"did you mean",
|
"did you mean",
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@ -345,41 +345,7 @@ fn hides_env_import_1() -> TestResult {
|
|||||||
#[ignore]
|
#[ignore]
|
||||||
fn hides_env_import_2() -> TestResult {
|
fn hides_env_import_2() -> TestResult {
|
||||||
fail_test(
|
fail_test(
|
||||||
r#"module spam { export env foo { "foo" } }; use spam; hide-env spam; $env.'spam foo'"#,
|
r#"module spam { export-env { let-env foo = "foo" } }; overlay use spam; hide-env spam; $env.foo"#,
|
||||||
"did you mean",
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[test]
|
|
||||||
#[ignore]
|
|
||||||
fn hides_env_import_3() -> TestResult {
|
|
||||||
fail_test(
|
|
||||||
r#"module spam { export env foo { "foo" } }; use spam; hide-env spam [foo]; $env.'spam foo'"#,
|
|
||||||
"did you mean",
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn hides_env_import_4() -> TestResult {
|
|
||||||
fail_test(
|
|
||||||
r#"module spam { export env foo { "foo" } }; use spam foo; hide-env foo; $env.foo"#,
|
|
||||||
"did you mean",
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn hides_env_import_5() -> TestResult {
|
|
||||||
fail_test(
|
|
||||||
r#"module spam { export env foo { "foo" } }; use spam *; hide-env foo; $env.foo"#,
|
|
||||||
"did you mean",
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[test]
|
|
||||||
#[ignore]
|
|
||||||
fn hides_env_import_6() -> TestResult {
|
|
||||||
fail_test(
|
|
||||||
r#"module spam { export env foo { "foo" } }; use spam *; hide-env spam *; $env.foo"#,
|
|
||||||
"did you mean",
|
"did you mean",
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@ -387,7 +353,7 @@ fn hides_env_import_6() -> TestResult {
|
|||||||
#[test]
|
#[test]
|
||||||
fn hides_def_runs_env_import() -> TestResult {
|
fn hides_def_runs_env_import() -> TestResult {
|
||||||
run_test(
|
run_test(
|
||||||
r#"module spam { export env foo { "foo" }; export def foo [] { "bar" } }; use spam foo; hide foo; $env.foo"#,
|
r#"module spam { export-env { let-env foo = "foo" }; export def foo [] { "bar" } }; overlay use spam; hide foo; $env.foo"#,
|
||||||
"foo",
|
"foo",
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@ -395,7 +361,7 @@ fn hides_def_runs_env_import() -> TestResult {
|
|||||||
#[test]
|
#[test]
|
||||||
fn hides_def_and_env_import_1() -> TestResult {
|
fn hides_def_and_env_import_1() -> TestResult {
|
||||||
fail_test(
|
fail_test(
|
||||||
r#"module spam { export env foo { "foo" }; export def foo [] { "bar" } }; use spam foo; hide foo; hide-env foo; $env.foo"#,
|
r#"module spam { export-env { let-env foo = "foo" }; export def foo [] { "bar" } }; overlay use spam; hide foo; hide-env foo; $env.foo"#,
|
||||||
"did you mean",
|
"did you mean",
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@ -403,7 +369,7 @@ fn hides_def_and_env_import_1() -> TestResult {
|
|||||||
#[test]
|
#[test]
|
||||||
fn hides_def_and_env_import_2() -> TestResult {
|
fn hides_def_and_env_import_2() -> TestResult {
|
||||||
fail_test(
|
fail_test(
|
||||||
r#"module spam { export env foo { "foo" }; export def foo [] { "bar" } }; use spam foo; hide foo; hide-env foo; foo"#,
|
r#"module spam { export-env { let-env foo = "foo" }; export def foo [] { "bar" } }; overlay use spam; hide foo; hide-env foo; foo"#,
|
||||||
"", // we just care if it errors
|
"", // we just care if it errors
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@ -435,7 +401,7 @@ fn hide_shadowed_decl() -> TestResult {
|
|||||||
#[test]
|
#[test]
|
||||||
fn hide_shadowed_env() -> TestResult {
|
fn hide_shadowed_env() -> TestResult {
|
||||||
run_test(
|
run_test(
|
||||||
r#"module spam { export env foo { "bar" } }; let-env foo = "foo"; do { use spam foo; hide-env foo; $env.foo }"#,
|
r#"module spam { export-env { let foo = "bar" } }; let-env foo = "foo"; overlay use spam; hide-env foo; $env.foo"#,
|
||||||
"foo",
|
"foo",
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user