This change resolves issues with exponent calculation and usage,
ensuring more accurate formatting:
- Exponent for negative values can differ from 0
- Switching to decimal mode now follows the P > X ≥ −4 rule
* Added error handling to ensure '=' after -u returns 125 as '=' is not allowed
* Added tests for disallow = on short options
* Added error handling to ensure '=' after -u returns 125 as '=' is not allowed
* Added tests for disallow = on short options
* Disallow only short unset option from having '=' as its starting character
* Remove needless tests and update function name for clarity
Fix a subtraction underflow that occurred on `head --bytes=-N` when the
input had fewer than `N` bytes. Before this commit,
printf "a" | head -c -2
would panic. After this commit, it terminates successfully with no
output as expected.
Improve the error message produced by `seq` when given invalid format
specifiers for the `-f` option. Before this commit:
$ seq -f "%" 1
seq: %: invalid conversion specification
$ seq -f "%g%" 1
seq: %: invalid conversion specification
After this commit:
$ seq -f "%" 1
seq: format '%' ends in %
$ seq -f "%g%" 1
seq: format '%g%' has too many % directives
This matches the behavior of GNU `seq`.
Currently fails with:
```
2024-12-28T14:55:18.9330231Z thread 'main' panicked at src/uu/chroot/src/chroot.rs:284:46:
2024-12-28T14:55:18.9330718Z called `Result::unwrap()` on an `Err` value: Custom { kind: NotFound, error: "Not found: nobody:+65535" }
2024-12-28T14:55:18.9331305Z note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
```
- improve move-to-self detection, so this errors without data loss:
```diff
mkdir mydir
mv mydir mydir/subdir
-mv: No such file or directory (os error 2)
+mv: cannot move 'mydir' to a subdirectory of itself, 'mydir/subdir'
```
- align "cannot move source to a subdirectory of itself" and "same file"
errors more closely with coreutils:
```diff
mkdir mydir
mv mydir/ mydir/..
-mv: cannot move 'mydir/' to a subdirectory of itself, 'mydir/../mydir/'
+mv: 'mydir/' and 'mydir/../mydir' are the same file
```
Causing: https://github.com/nushell/nushell/issues/13082
* 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>
Fix bug #6944
Rework the way batching is done with sort such that it doesn't open
more input files than necessary. Previously, the code would always
open one extra input file which causes problems in ulimit scenarios.
Add additional test case.
* stat: fix the quotes when dealing with %N
and other formats
should fix
tests/stat/stat-fmt.sh
* stats: use an enum instead of a string
* stats: split the functions into smaller functions
* stat: handle byte as a format for better display
* stat: handle error better. should make tests/stat/stat-printf.pl pass
* stat: Some escape sequences are non-standard
* Fix tests
* Take comments into account
* fix(seq): handle 0e... scientific notation without padding
- Updated the parse_exponent_no_decimal function to treat 0e... as zero.
- Added test cases to verify correct behavior for 0e15 and -w 0e15.
Fix: #6926
* fix(seq): improved parse for accurate BigDecimal handling
* apply missing cargo fmt formatting adjustments
* no padding
* --wrap 0
+ remove property_tests.rs, we don't need such tests as the
code is already tests by test_base* (+ it is too dependant
on the code structure)
Should make base64.pl pass
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>