mirror of
https://github.com/nushell/nushell.git
synced 2025-06-30 22:50:14 +02:00
Fix print_table_or_error when table
is overridden (#6130)
Related #6113 Signed-off-by: nibon7 <nibon7@163.com>
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
use crate::tests::{fail_test, run_test, run_test_contains, TestResult};
|
||||
use nu_test_support::nu;
|
||||
|
||||
#[test]
|
||||
fn no_scope_leak1() -> TestResult {
|
||||
@ -135,3 +136,9 @@ fn help_not_present_in_extern() -> TestResult {
|
||||
fn override_table() -> TestResult {
|
||||
run_test(r#"def table [] { "hi" }; table"#, "hi")
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn override_table_eval_file() {
|
||||
let actual = nu!(cwd: ".", r#"def table [] { "hi" }; table"#);
|
||||
assert_eq!(actual.out, "hi");
|
||||
}
|
||||
|
Reference in New Issue
Block a user