mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 10:36:00 +02:00
Add modulo operator and simplify in/not-in (#2505)
This commit is contained in:
@ -161,6 +161,18 @@ fn parens_precedence() {
|
||||
assert_eq!(actual.out, "12");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn modulo() {
|
||||
let actual = nu!(
|
||||
cwd: "tests/fixtures/formats", pipeline(
|
||||
r#"
|
||||
= 9 mod 2
|
||||
"#
|
||||
));
|
||||
|
||||
assert_eq!(actual.out, "1");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn duration_math() {
|
||||
let actual = nu!(
|
||||
|
Reference in New Issue
Block a user