Fix a bug in test_acl_preserve that was causing "setfacl: a: No such file or directory"
error messages when running with `cargo test --features=cp test_acl_preserve`.
Changes:
- Use plus_as_string on path1 to generate the correct absolute path
- Move the file path generation closer to where it's used for better code organization
GNU `seq` doesn't support such large positive exponents anyway,
and we are limited by i64 range, so increase the exponent value
to make sure we fully overflow that range.
Also, add a test to check that a very, very, small number is
treated as 0 (that's also undefined behaviour, but it does
make sense in a way).
The default hex format, on x86(-64) prints 15 digits after the
decimal point, _but_ also trims trailing zeros, so it's not just
a simple default precision and a little bit of extra handling is
required.
Also add a bunch of tests.
Fixes#7364.
When parsing integers, we should still return the min/max value
of the type (depending on the type), and wrap that in the error.
We need to refactor the map function to handle this case better,
and add an extract function to get the value out of an error
(if any).
This fixes the integer part of #7508.
It's not totally clear why they sometimes work, sometimes fail,
but it does appear that running `stat` on `/dev/stdin` is perhaps
not the most reliable approach.
A likely more solid approach is described in #7583.
* Fixes#7558 Added check to only insert addition double hyphen if at start of arguments to correctly prepend addition hyphens for clap as well as additional test case
* additional comment
* fixes issue where flags precedes "--" as arguments
Fixes issue #7472.
Update to head app when printing all-but-last-n-lines of a file.
Code now checks if the last line of the input file is missing a terminating
newline character, and if so prints an extra line.
This aligns with GNU-head behavior.
Also improved performance of this usecase by using an optimized iterator
(memchr-iter) for searching through the input file.
I found the logic a little difficult to understand, and the
comment probably doesn't match what `-N` is supposed to do?
Intead, let's just manually set mtime and atime.
Hopefully this helps clear up Android flakiness in #7570. Or at
least understand better what is going on.