Dorian Peron
6e23d4e979
tests: patch tests to simplify imports
2025-07-01 03:36:46 +02:00
Jan Verbeek
cba48c0284
cut: Flush BufWriter
, centralize output file logic
2025-03-31 13:45:10 +02:00
Sylvestre Ledru
a0179ea239
uutests: adjust the tests to use them
2025-03-28 21:40:31 +01:00
Sylvestre Ledru
18cb7dcf9e
Use the new function fails_with_code
...
Done with
```
$ perl -0777 -i -pe 's/([ \t]+)\.fails\(\)[ \t]*\n[ \t]+\.no_stdout\(\)[ \t]*\n[ \t]+\.code_is\(([0-9]+)\);/\1.fails_with_code(\2)\n\1.no_stdout();/gs' *rs
$ sed -i -e "s|.fails()(.*).code_is(|.fails_with_code(|g" *rs
$ perl -0777 -i -pe 's/([ \t]+)\.fails\(\)[ \t]*\n[ \t]+\.code_is\(([0-9]+)\);/\1.fails_with_code(\2);/gs' *rs
$ perl -0777 -i -pe 's/([ \t]+)\.fails\(\)(.*?)[ \t]+\.code_is\(([0-9]+)\);/\1.fails_with_code(\3)\2;/gs' *rs
...
```
2025-03-01 17:26:20 +01:00
Daniel Hofstetter
20dfb27057
cut: fix handling of newline as delimiter
2024-12-27 09:12:47 +01:00
Daniel Hofstetter
392c48002c
cut: don't merge adjacent ranges
2024-12-22 15:07:04 +01:00
Daniel Hofstetter
cf8a81c6c2
cut: fix overriding of -d=
2024-12-20 10:02:36 +01:00
Daniel Hofstetter
6224c374ae
cut: use short and long args in two tests
2024-12-18 16:17:30 +01:00
Daniel Hofstetter
5ea4903632
cut: rename some tests
2024-12-18 14:52:04 +01:00
Daniel Hofstetter
9aca24365f
cut: simplify test by removing assert_eq! calls
2024-12-18 14:44:12 +01:00
Daniel Hofstetter
2f82853bfa
cut: move two tests to better places within file
2024-12-18 14:42:18 +01:00
Sylvestre Ledru
6755956bc4
cut.pl: adjust to our messages as they are better ( #6921 )
...
* cut.pl: adjust to our messages as they are better
but we still have some differences on this test
* cut: add some missing line return when needed
* cut: add failing tests covered by cut.pl
* Remove dup test
* cut: add spell-checker:ignore line to test
---------
Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
2024-12-16 15:37:29 +01:00
andreistan26
5b087e9624
Fix cut
when lines dont end with specified delim ( #5844 )
...
Print lines without delimiters only when they end with specified line terminator('\n' by default or `\0` if `-s`)
Signed-off-by: Andrei Stan <andreistan2003@gmail.com>
Co-authored-by: Sylvestre Ledru <sylvestre@debian.org>
2024-12-04 00:04:55 +01:00
Jadi
1137d9a62d
cut: two new tests; -d conflict & no arg
2024-04-04 21:33:22 +03:30
Yury Zhytkou
156d3f7ee7
cut: allow non utf8 characters for delimiters ( #6037 )
2024-03-10 22:36:17 +01:00
wolimst
cb0ce0e1cb
cut: show error for multiple mode args (-b, -c, -f)
2024-02-09 15:56:15 +09:00
Daniel Hofstetter
c8cd355708
cut: set exit code to 1 if dir is specified
2024-01-26 10:18:44 +01:00
Daniel Hofstetter
5bd00eb791
cut: split test function into two functions
2024-01-26 10:09:28 +01:00
Sylvestre Ledru
bc51b8d216
cut: allow the same option to be passed multiple times
2024-01-13 15:09:16 +01:00
Daniel Hofstetter
6eec4fe8f9
cut: add test & improve error message
2023-11-29 09:41:11 +01:00
Sylvestre Ledru
99120d32c1
cut: fail when the input == usize::MAX
2023-09-26 09:40:21 +02:00
Sylvestre Ledru
bfca6bf70f
Add license headers on all files
2023-08-21 10:49:27 +02:00
Daniel Hofstetter
6988eb7ec6
tests: expand wildcard imports
2023-03-20 15:32:35 +01:00
TechHara
9798ae7987
fix clippy complaint
2022-12-13 20:34:01 -05:00
TechHara
11e64958d6
add test cases to cover cut -w failing options
2022-12-13 11:43:20 -05:00
TechHara
f6a0abaee3
add whitespace delimiter option
2022-12-12 12:00:57 -05:00
Terts Diepraam
9177cb7b24
all: add tests for usage error exit code
2022-09-10 20:59:42 +02:00
Jan Scheer
fa64407cb0
cut: fix argument parsing for the delimiter
...
This fixes the argument parsing for the delimiter for the two special
cases `-d=` and `-d ''`.
2022-06-09 22:14:43 +02:00
Terts Diepraam
18369dc0be
all: use array intoiterator
2022-04-05 10:39:31 +02:00
353fc443
c2bb9dd433
Fix clippy octal-escapes warning
2022-02-11 13:02:06 +00:00
Terts Diepraam
2412e4cbf7
add some tests for Clap's InferLongArgs setting
2022-01-29 02:06:32 +01:00
Roy Ivy III
f5edc500e0
tests ~ fix spelling errors
2021-06-19 18:40:22 -05:00
Jan Scheer
65f47be5ee
cut: fix -d=
( #2424 )
2021-06-18 12:10:40 +02:00
Jan Scheer
3aeccfd802
fix a lot of clippy warnings
2021-05-29 15:11:22 +02:00
Yağız can Değirmenci
071899d24d
tests: delete 'error:' prefix from the tests
2021-05-26 02:45:53 +03:00
Yagiz Degirmenci
f47345ec9b
cut: add gnu compatability to error messages
2021-04-03 20:55:10 +03:00
Roy Ivy III
de0375f909
tests ~ reorganize tests
2020-06-01 18:30:04 -05:00