Age | Commit message (Collapse) | Author |
|
Used quite a lot, especially with `--exclude-dir=.git`.
|
|
|
|
|
|
Add test to show failure case.
|
|
|
|
Also, debian's lsattr is producing longer output lines with new fields,
possibly an ioctl switch from FS_IOC_GETFLAGS -> FS_IOC_FSGETXATTR? Anyway,
todo items here...
|
|
Iterate over MANPATH and ordered sections using a manpath() helper
equivalent of indenting logic of man x, man 1 x, and man -k each with a
strsep loop.
|
|
This is a 15 year old freebsd extension (presumably thus also available on
MacOS) that glibc adopted in 2004, uClibc adopted in 2005, and bionic
supports. The only thing that DOESN'T support it is musl, once again
because its maintainer explicitly decided not to
(https://www.openwall.com/lists/musl/2013/01/15/26), so add an #ifdef
to let musl stay uniquely broken. (It'll stop at first NUL, everything
else can match NULs).
Finally fixes "s/x/y/g on a megabyte line of x's takes forever" issue.
|
|
Found when trying to update the toybox prebuilt used for the Android
build.
Also add the corresponding test.
|
|
|
|
POSIX finally gave us a way to use echo in a portable way despite
differences of opinion about whether to default interpretation of escape
sequences to on or off: -e enables and -E disables (as already
implemented by busybox and coreutils).
http://austingroupbugs.net/view.php?id=1222
|
|
Exec -k value as regex on basename, and on the first content line
outside a tag or on a referenced see-other, whichever appears earlier.
Reuse zcat choice as a function when looping over files. Fix \-\- and
glob.h include leftover. Handle man-pages example newlines. Clarify the
todos, naming package and issue. Remaining items are more of a wishlist
than a plan. Remove `<1>2` because it doesn't let `-k .` work, please
look into that.
|
|
|
|
Also fix the non-tty output.
Also tweak our output so the tests pass with TEST_HOST=1 too.
|
|
Use a real .class file and add tests for the other formats that file(1)
recognizes and we already have sample input in tests/files/.
|
|
We keep regressing on this, and the ELF stuff is quite complicated, so
even though checking in binaries isn't my first choice, this seems like
a good use of 20KiB...
|
|
|
|
|
|
To look up docs on my netbook and server. Practically deroff.1, with
heuristic for where to put spaces and newlines. How would you simplify
file resolution and bzcat? What have I got wrong when escaping slashes,
because while \-\^\- is -- ok, \-\- becomes -\-, e.g. in git-pull.1?
|
|
leaking memory), and mod env command to test it.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
A trivial test, but it would have caught the previous bug...
|
|
and fix tests to pass on host too.
|
|
Gentoo removes verbosely when building packages, for example vim-core:
https://github.com/gentoo/gentoo/blob/665eaa8/app-editors/vim-core/vim-core-8.1.0648.ebuild#L120
Implement like toy cp, without prepending an escape sign to quotation
marks in filenames. Document in a test this difference from coreutils
but similarity to busybox. How do other implementations handle such
escapes? If it matters, would you approach it with a loop and multiple
prints or somehow else?
Short help description follows 141a075, consistent with other commands.
|
|
The return value of -exec was the command's exit code, which did not
account for the fact that an exit code of zero means success, while in
C, zero means failure. From POSIX:
> the primary shall evaluate as true if the utility returns a zero
> value as exit status
This commit flips the return value, and adds two tests.
|
|
|
|
Also be a bit more consistent about `COMMAND [ARG...]` in usage text.
|
|
This one with a little cleanup of unnecessary duplication.
|
|
|
|
Also add a test, and add a test for timeout now it's been fixed.
|
|
I'm not worried about hard-coding the *century* in the other test. We'll
be long dead before that's an issue, and it's easier to read this way.
|
|
Sunday's transition in the US broke a bunch of the tests. Worse, it
broke some of the QA folks' scripts. Finally, the boil that is date's
handling of time zones and daylight time has come to a head...
This patch fixes the newly-failing tests *and* the other tests that were
checked in failing to serve as TODOs.
I've resolved the test TODOs about whether implied year/century in POSIX
format should mean the current year or 1900 in favor of the current
year. Both busybox and coreutils agree, and Rob fixed the code recently
so toybox agrees too, but without fixing the tests.
I've switched tests from Europe/London to Europe/Berlin to avoid
disagreements between C libraries about whether to say "GMT" or "UTC"
when daylight savings is not in force.
The majority of this patch implements what I'd been unsuccessfully
trying to explain on the list: that to correctly implement the distinct
input and output time zones (as demonstrated in the three failing tests
we've been carrying around for a while), we should switch to working
with time_t internally rather than struct tm. I've also added the code
to temporarily switch to the input time zone (and back again).
All the tests now pass.
|
|
were identical, so add a small delay.
|
|
--signal is simply a synonym for the exiting -s.
--foreground disables functionality we didn't yet have: putting the
child into a new process group. I've added the functionality and the
flag to disable it.
--preserve-status also makes it clear that our exit statuses didn't match
the coreutils version. In addition to callers that use --preserve-status
to get away from this madness, I also have callers that check for
specific exit values. This patch implements --preserve-status but also
fixes all the other exit statuses.
(The "125" exit value is broken for toybox in the same way that
`toybox grep --whoops ; echo $?` is. To fix this, we'd need some way to
signal that command-line parsing failures should exit with a different
value than the usual 1 --- 2 for grep, 125 for timeout. I've done as much
as grep manages, and left a TODO.)
Also add timeout tests. I couldn't think of an easy test for
--foreground, so I tested that manually with strace.
Also add some newlines to the `toybox --help` output to make it easier
to find the different sections, and expand the section on durations to
call out that fractions are supported as a matter of policy.
As long as timeout and sleep have text describing the duration syntax,
make them the same. (Personally I'd remove both in favor of the `toybox
--help` output, but as long as they're duplicated, keep them consistent.)
Also remove the SLEEP_FLOAT variant --- xparsetime means that sleep no
longer requires floating point to support sub-second resolution.
|
|
Needed to improve cp(1) testing.
|
|
Plus new tests.
|
|
Add the SKIP_HOST=1 for the POSIX inputs to -d that coreutils doesn't support.
Fix some comments now Rob's pointed out that the "weird" format was just
POSIX with implicit CCYY or CC. (I was confused because coreutils rejects
them [as it rejects all POSIX input to -d], but busybox does accept them,
but interprets them differently, as explained in the test comments.)
Also rename the tests to make it clearer that these are all POSIX format.
|
|
Very few places actually check for errors from emit, and I actually see
the same endless loop from "sed (GNU sed) 4.4" on current Debian, so I'm
not sure this isn't Broken As Designed, but an endless loop spewing
"short write" (or saying nothing, in the case of GNU sed) really doesn't
feel like useful behavior in face of EPIPE, which really isn't going to
fix itself. Certainly not being able to run the sed tests to completion
is pretty annoying --- which is why, unless we remove this test as
invalid, we should probably also add a SKIP_HOST=1 to the "b loop" test.
Note that even with this fix you'll see the error twice:
sed: short write: Broken pipe
sed: short write: Broken pipe
Once from the first = command to fail, and then another from the !FLAG(n)
flush of the pattern space.
|
|
The test for \N where N was larger than the number of capturing groups
in the regular expression was incorrect, and firing for cases such as
matching __(ARM_)?NR_([a-z]*) against __NR_read, where the first group is
empty (because it failed to match) but the second group did match "read".
Use regex_t's re_nsub for the error check, and treat rm_so == -1 as a
signal to just copy nothing into the result.
(Found trying to build minijail in AOSP.)
|
|
Add support for more input formats, primarily the ISO formats used by
the AOSP build.
I've improved/added to the tests a bit to cover these changes, and to
explain the reasons for the various remaining test failures (none of
which are regressions caused by this patch).
|
|
Bug: http://b/123902291
|
|
I'm switching to a new laptop, and found this from 2017-07. I think
these are the tests used for the Android libziparchive-based unzip.
They pass on the host.
|
|
Implement -p, -t, and -r.
Add some missing tests.
Move -L and -x back to TODO since they're not implemented and I haven't
yet even understood what they're supposed to do.
|