mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 19:37:45 +02:00
Signed-off-by: closetool <c299999999@qq.com>
This commit is contained in:
@ -34,3 +34,21 @@ fn compare_to_nothing() {
|
||||
);
|
||||
assert_eq!(actual.out, "true");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn compare_nothing_and_boolean() {
|
||||
let actual = nu!(
|
||||
cwd: ".",
|
||||
r#"
|
||||
if $true == $nothing {echo $true} {echo $false}
|
||||
"#
|
||||
);
|
||||
assert_eq!(actual.out, "false");
|
||||
let actual = nu!(
|
||||
cwd: ".",
|
||||
r#"
|
||||
if $false == $nothing {echo $true} {echo $false}
|
||||
"#
|
||||
);
|
||||
assert_eq!(actual.out, "false");
|
||||
}
|
||||
|
Reference in New Issue
Block a user