1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 11:37:44 +00:00

seq: Adds testing for large hex numbers

This commit is contained in:
vulppine 2021-10-03 09:50:49 -07:00
parent aad0682a40
commit 4e1f945e86

View file

@ -2,7 +2,7 @@ use crate::common::util::*;
use std::io::Read;
#[test]
fn test_hex_rejects_posneg_after_identifier() {
fn test_hex_rejects_sign_after_identifier() {
new_ucmd!()
.args(&["0x-123ABC"])
.fails()
@ -41,6 +41,19 @@ fn test_hex_lowercase_uppercase() {
.stdout_is("10\n");
}
#[test]
fn test_hex_big_number() {
new_ucmd!()
.args(&[
"0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF",
"0x100000000000000000000000000000000",
])
.succeeds()
.stdout_is(
"340282366920938463463374607431768211455\n340282366920938463463374607431768211456\n",
);
}
#[test]
fn test_rejects_nan() {
let ts = TestScenario::new(util_name!());