Commit graph

10 commits

Author SHA1 Message Date
Michael Debertol
5329d77cc2 seq: adapt output to GNU seq 2021-06-01 20:35:18 +02:00
Michael Debertol
9b29ac98a5 seq: reject NaN arguments
Move the validation logic to an argument validator.
2021-06-01 18:30:18 +02:00
Michael Debertol
4cf18e96f3 seq: change default value for -t and remove dubious escape sequences
GNU seq does not support -t, but always outputs a newline at the end.
Therefore, our default for -t should be \n.

Also removes support for escape sequences (interpreting a literal "\n"
as a newline). This is not what GNU seq is doing, and unexpected.
2021-05-31 21:20:19 +02:00
Michael Debertol
6ccc305513 seq: implement integer sequences
If we notice that we can represent all arguments as BigInts, take a
different code path. Just like GNU seq this means we can print an
infinite amount of numbers in this case.
2021-05-31 21:20:12 +02:00
Sylvestre Ledru
2c09556964 rustfmt some tests 2021-03-13 23:30:47 +01:00
James Robson
0dbed0fd59 Do not allow seq to run with an increment of zero 2021-02-18 21:10:53 +00:00
Sylvestre Ledru
94e293f2bf fix formatting fr test_seq 2021-01-02 10:14:18 +01:00
Sylvestre Ledru
469abf2427 bug(seq) - Allow 'seq 6 -1 0'
Was failing with
```
Found argument '-1' which wasn't expected, or isn't valid in this context
```
otherwise
2020-12-19 11:55:43 +01:00
Sylvestre Ledru
b4969c6cc2 test(seq): add a test to check that we don't accept more than 3 args 2020-10-25 10:44:50 -05:00
Roy Ivy III
de0375f909 tests ~ reorganize tests 2020-06-01 18:30:04 -05:00
Renamed from tests/test_seq.rs (Browse further)