mirror of
https://github.com/nushell/nushell.git
synced 2025-04-01 19:56:41 +02:00
Fix tests failing without export
This commit is contained in:
parent
244289c901
commit
8ed6afe1e5
10
src/tests.rs
10
src/tests.rs
@ -346,7 +346,7 @@ fn better_block_types() -> TestResult {
|
|||||||
#[test]
|
#[test]
|
||||||
fn module_imports_1() -> TestResult {
|
fn module_imports_1() -> TestResult {
|
||||||
run_test(
|
run_test(
|
||||||
r#"module foo { def a [] { 1 }; def b [] { 2 } }; use foo; foo.a"#,
|
r#"module foo { export def a [] { 1 }; def b [] { 2 } }; use foo; foo.a"#,
|
||||||
"1",
|
"1",
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@ -354,7 +354,7 @@ fn module_imports_1() -> TestResult {
|
|||||||
#[test]
|
#[test]
|
||||||
fn module_imports_2() -> TestResult {
|
fn module_imports_2() -> TestResult {
|
||||||
run_test(
|
run_test(
|
||||||
r#"module foo { def a [] { 1 }; def b [] { 2 } }; use foo.a; a"#,
|
r#"module foo { export def a [] { 1 }; def b [] { 2 } }; use foo.a; a"#,
|
||||||
"1",
|
"1",
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@ -362,7 +362,7 @@ fn module_imports_2() -> TestResult {
|
|||||||
#[test]
|
#[test]
|
||||||
fn module_imports_3() -> TestResult {
|
fn module_imports_3() -> TestResult {
|
||||||
run_test(
|
run_test(
|
||||||
r#"module foo { def a [] { 1 }; def b [] { 2 } }; use foo.*; b"#,
|
r#"module foo { export def a [] { 1 }; export def b [] { 2 } }; use foo.*; b"#,
|
||||||
"2",
|
"2",
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@ -370,7 +370,7 @@ fn module_imports_3() -> TestResult {
|
|||||||
#[test]
|
#[test]
|
||||||
fn module_imports_4() -> TestResult {
|
fn module_imports_4() -> TestResult {
|
||||||
fail_test(
|
fail_test(
|
||||||
r#"module foo { def a [] { 1 }; def b [] { 2 } }; use foo.c"#,
|
r#"module foo { export def a [] { 1 }; export def b [] { 2 } }; use foo.c"#,
|
||||||
"not find import",
|
"not find import",
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@ -378,7 +378,7 @@ fn module_imports_4() -> TestResult {
|
|||||||
#[test]
|
#[test]
|
||||||
fn module_imports_5() -> TestResult {
|
fn module_imports_5() -> TestResult {
|
||||||
run_test(
|
run_test(
|
||||||
r#"module foo { def a [] { 1 }; def b [] { 2 }; def c [] { 3 } }; use foo.[a, c]; c"#,
|
r#"module foo { export def a [] { 1 }; def b [] { 2 }; export def c [] { 3 } }; use foo.[a, c]; c"#,
|
||||||
"3",
|
"3",
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user