Make at_line_start persist between printing each file. This fixes an
issue when numbering lines in the output and one of the input files
does not have a trailing newline.
- adds conditional supports for unix domain sockets
- adds unix domain socket test
- adds Results to functions, removing unwraps
- uutils `cat` used to panic on broken stdout pipes (e.g. `cat
/dev/zero | head -c1`). this is fixed in this PR
- updated to exit 0 on success, and 1 if an error occurs.
- adds docstrings
- adds an error log on printing a directory
- adds categorization of other filetypes for extensible
differentiation of behaviors
- adds OutputOptions struct to replace params for extensibility
- adds correct status code on exit
Fixes#1017.
test_mkdir_dup_dir asserted that creating an existing directory is an
error, but that's not how GNU coreutils behaves. This has been reported
in #121, but wasn't fixed (only the `-p` case was).
`test_chmod_ugoa` and `test_chmod_many_options` both change umask, which
is global state. Since tests run concurrently, this might lead to
a situation where one of the tests changes umask to a value that screws
another test's checks. To prevent this, we introduce a mutex that should
be held by any test that changes umask.
Unfortunately, there's no way to hide umask behind this mutex and
enforce its usage: programmers will have to maintain the discipline
themselves.
`test_chmod_many_options` relied on user's umask not denying read access
for anyone. 022, which is the default umask for many, indeed allows read
access for everyone. I'm using 027, which disallows read for everyone
but owner and group. This made tests fail.
Now tests set and reset umask, ensuring checks are run in a reliable,
predictable environment.
/dev/pts/ptmx seems to be the only character special file in /dev
which is not a bind-mount in the docker container run by travis.
gnu stat does not detect these mounts, so produces a different
output for /dev/zero.
* update status in README.md
* enable busybox tests
Adding `CONFIG_DESKTOP` and `CONFIG_LONG_OPTS` to busybox config.
These flags also enable other tests, but those utilities are not
included in `TEST_PROGS`. (eg. awk)
* fix whitespace and small issues
* fix Eq imp for FormatWriter on nightly + beta
* fix indention in multifilereader.rs
* fix intermittent errors in tests