mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-08-01 13:37:48 +00:00
Merge pull request #2328 from miDeb/seq/validator
seq: reject NaN arguments
This commit is contained in:
commit
132ddf98b6
2 changed files with 34 additions and 27 deletions
|
@ -1,5 +1,21 @@
|
|||
use crate::common::util::*;
|
||||
|
||||
#[test]
|
||||
fn test_rejects_nan() {
|
||||
new_ucmd!()
|
||||
.args(&["NaN"])
|
||||
.fails()
|
||||
.stderr_only("seq: invalid 'not-a-number' argument: 'NaN'\nTry 'seq --help' for more information.");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_rejects_non_floats() {
|
||||
new_ucmd!()
|
||||
.args(&["foo"])
|
||||
.fails()
|
||||
.stderr_only("seq: invalid floating point argument: 'foo'\nTry 'seq --help' for more information.");
|
||||
}
|
||||
|
||||
// ---- Tests for the big integer based path ----
|
||||
|
||||
#[test]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue