mirror of
https://github.com/nushell/nushell
synced 2024-12-28 22:13:10 +00:00
Add test for double def
This commit is contained in:
parent
fb0f83e574
commit
2c1b074bdc
1 changed files with 8 additions and 0 deletions
|
@ -447,6 +447,14 @@ fn hide_twice_not_allowed() -> TestResult {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn def_twice_should_fail() -> TestResult {
|
||||||
|
fail_test(
|
||||||
|
r#"def foo [] { "foo" }; def foo [] { "bar" }"#,
|
||||||
|
"defined more than once",
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn from_json_1() -> TestResult {
|
fn from_json_1() -> TestResult {
|
||||||
run_test(r#"('{"name": "Fred"}' | from json).name"#, "Fred")
|
run_test(r#"('{"name": "Fred"}' | from json).name"#, "Fred")
|
||||||
|
|
Loading…
Reference in a new issue