1
Fork 0
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:
Arthur Pin 2024-12-06 17:47:22 -03:00
parent 76dfcd82fa
commit 88e10478bc
2 changed files with 6 additions and 0 deletions

View file

@ -392,6 +392,7 @@ mod tests {
fn test_parse_big_int() {
assert_eq!(parse("0"), ExtendedBigDecimal::zero());
assert_eq!(parse("0.1e1"), ExtendedBigDecimal::one());
assert_eq!(parse("0.1E1"), ExtendedBigDecimal::one());
assert_eq!(
parse("1.0e1"),
ExtendedBigDecimal::BigDecimal("10".parse::<BigDecimal>().unwrap())

View file

@ -333,6 +333,11 @@ fn test_width_scientific_notation() {
.succeeds()
.stdout_is("0999\n1000\n")
.no_stderr();
new_ucmd!()
.args(&["-w", "999", "1E3"])
.succeeds()
.stdout_is("0999\n1000\n")
.no_stderr();
}
#[test]