Daniel Hofstetter
3ad226cf54
fmt: show error if goal > default width
2024-03-20 10:26:11 +01:00
Joseph Jon Booker
f456b9531f
fmt: Make sure goal is always positive
...
A debug assertion was added to enforce "width >= goal" to catch
that case before a panic in linebreak.rs. A few warnings in linebreak.rs
were addressed as well, and some isize's that should always be positive
(if there's no width/goal bugs) were changed to usizes to catch bugs
earlier.
test_fmt_width is updated to test for the same result as GNU fmt
2024-03-19 08:52:04 -05:00
Daniel Hofstetter
51eb20a15d
fmt: use clap's value parser for goal & width
2023-09-28 10:50:56 +02:00
Sylvestre Ledru
bfca6bf70f
Add license headers on all files
2023-08-21 10:49:27 +02:00
Bluelief
a7ab660a38
fmt: change test to ignore and fix test output
...
- fix test to get same result as GNU fmt
2023-08-15 00:43:32 +09:00
Bluelief
946e1bb2d1
fmt: fix panic on width argument
2023-08-14 22:47:21 +09:00
Daniel Hofstetter
72041568e7
fmt: cleanup tests
2023-04-20 15:22:26 +02:00
Daniel Hofstetter
6988eb7ec6
tests: expand wildcard imports
2023-03-20 15:32:35 +01:00
Terts Diepraam
9177cb7b24
all: add tests for usage error exit code
2022-09-10 20:59:42 +02:00
Yağız can Değirmenci
071899d24d
tests: delete 'error:' prefix from the tests
2021-05-26 02:45:53 +03:00
jaggededgedjustice
a2658250fc
Fix fmt crashing on subtracting unsigned numbers ( #2178 )
2021-05-05 23:12:17 +02:00
Jan Scheer
646c6cacbc
refactor tests ( #1982 )
2021-04-23 02:28:46 +02:00
Gilad Naaman
81d42aa2b3
Fix some tests to not use CmdResult fields
2021-04-10 23:30:50 +03:00
Sylvestre Ledru
cacaf0cde8
bug(fmt): just like the GNU version, fails when -W is bigger than 2500
...
Closes : #1704
2021-01-25 08:45:33 +01:00
Roy Ivy III
de0375f909
tests ~ reorganize tests
2020-06-01 18:30:04 -05:00