mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 14:36:08 +02:00
Add long options for generators and math (#10752)
This commit is contained in:
@ -9,21 +9,21 @@ fn can_round_very_large_numbers() {
|
||||
|
||||
#[test]
|
||||
fn can_round_very_large_numbers_with_precision() {
|
||||
let actual = nu!("18.13725447800741422899276654867720121457878988 | math round -p 10");
|
||||
let actual = nu!("18.13725447800741422899276654867720121457878988 | math round --precision 10");
|
||||
|
||||
assert_eq!(actual.out, "18.137254478")
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn can_round_integer_with_negative_precision() {
|
||||
let actual = nu!("123 | math round -p -1");
|
||||
let actual = nu!("123 | math round --precision -1");
|
||||
|
||||
assert_eq!(actual.out, "120")
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn can_round_float_with_negative_precision() {
|
||||
let actual = nu!("123.3 | math round -p -1");
|
||||
let actual = nu!("123.3 | math round --precision -1");
|
||||
|
||||
assert_eq!(actual.out, "120")
|
||||
}
|
||||
|
Reference in New Issue
Block a user