mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
tests/seq: test scientific notation with uppercase 'E'
This commit is contained in:
parent
76dfcd82fa
commit
88e10478bc
2 changed files with 6 additions and 0 deletions
|
@ -392,6 +392,7 @@ mod tests {
|
||||||
fn test_parse_big_int() {
|
fn test_parse_big_int() {
|
||||||
assert_eq!(parse("0"), ExtendedBigDecimal::zero());
|
assert_eq!(parse("0"), ExtendedBigDecimal::zero());
|
||||||
assert_eq!(parse("0.1e1"), ExtendedBigDecimal::one());
|
assert_eq!(parse("0.1e1"), ExtendedBigDecimal::one());
|
||||||
|
assert_eq!(parse("0.1E1"), ExtendedBigDecimal::one());
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
parse("1.0e1"),
|
parse("1.0e1"),
|
||||||
ExtendedBigDecimal::BigDecimal("10".parse::<BigDecimal>().unwrap())
|
ExtendedBigDecimal::BigDecimal("10".parse::<BigDecimal>().unwrap())
|
||||||
|
|
|
@ -333,6 +333,11 @@ fn test_width_scientific_notation() {
|
||||||
.succeeds()
|
.succeeds()
|
||||||
.stdout_is("0999\n1000\n")
|
.stdout_is("0999\n1000\n")
|
||||||
.no_stderr();
|
.no_stderr();
|
||||||
|
new_ucmd!()
|
||||||
|
.args(&["-w", "999", "1E3"])
|
||||||
|
.succeeds()
|
||||||
|
.stdout_is("0999\n1000\n")
|
||||||
|
.no_stderr();
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue