Age | Commit message (Collapse) | Author |
|
|
|
LTP uses `top -d 0.1`, which isn't convincingly useful, but general
support for other time units might be useful, and switching to xparsetime
addresses both at once.
Also fix 3169d948c049664bcf7216d4c4ae751881099d3e where I mistakenly
treated `rev` and `toys.optflags&FLAG_b` as interchangeable. (Without
this second fix, `top -b` looks fine but `top` is broken!)
Also fix xparsetime to reject input such as "monkey" or "1monkey".
|
|
Reuse create_uuid, but make it match the current RFC.
|
|
Note: ubuntu will show -m through a file, this treat that as error.
|
|
ln -f does the rm and retry if the first attempt fails for any reason.
So if you run the readlink test with an ubuntu host $PATH, it fails, but
it works with a toybox host path.
|
|
|
|
|
|
Switch the printf over to %s because the input is actually hex (so %d
is wrong), but without the leading "0x" that %x would require.
For some reason the NODE assignment wasn't providing any input to awk
(hence the hang), and awk wasn't looking for the correct field anyway.
The tests still fail for me:
losetup: /dev/block/loop0: No such device or address
losetup: /dev/block/loop0: No such device or address
losetup: file: No such file or directory
losetup: needs 1 arg (see "losetup --help")
But at least now they allow the other tests to continue!
|
|
Bringing the zlib-based gzip/gunzip/zcat over to toybox is a problem for
another day, but at least the tests are easy...
(These tests pass with TEST_HOST and on the toolbox versions, but the
toybox toys are in pending and very broken.)
|
|
The original xxd doesn't support -r with -i. The original also outputs
"unsigned char name[] = { ... };" for input other than stdin, but that
actually makes it less useful --- many languages support array
initializers, but far fewer support that exact declaration syntax.
Also fix the -c range checking and defaulting: ><= in the argument string
only works for floating point arguments.
Bug: http://b/64711851
|
|
Also make -0 and -E mutually exclusive (rather than just ignore -E
with -0).
Bug: https://github.com/landley/toybox/issues/78
|
|
A very simple implementation of fmt, good enough for my daily use of !!fmt
in vi to reflow checkin comments like this.
|
|
Found running LTP file system tests on Android.
Bug: http://b/70627145
|
|
|
|
|
|
Josh Gao hit a case where "seq 1000000 1000001" output 1e+06, and while he
was there changed several things to work like existing seq implementations.
I changed a couple back (commenting out the test cases) until somebody
came come up with a reason (or existing use case) to do it that way.
|
|
|
|
|
|
(And is much faster if your shell doesn't have a builtin printf.)
|
|
because ubuntu's can't.)
|
|
|
|
We don't currently do that, but a test suite checking that we don't
do that is requiring us to violate posix to pass it.
|
|
|
|
and don't expect a specific error message, just that it errored.)
|
|
Fixes missing newline in output if last byte of the input is string.
Fixes one-off offset bug.
Adds strings tests.
Signed-off-by: Ilya Kuzmich <ilya.kuzmich@gmail.com>
|
|
Not POSIX, but implemented in coreutils, busybox and freebsd.
|
|
Not POSIX, but implemented in coreutils and busybox.
Tests use sed to compensate for the stdin naming difference.
Signed-off-by: Ilya Kuzmich <ilya.kuzmich@gmail.com>
|
|
Also trivial cleanup of pipe -> xpipe.
Bug: http://b/38215123
|
|
I didn't implement %37N's ability to insert zeroes, so removed those
two tests. If you really need it, I can add the divide loop back.
|
|
|
|
This test fails with mksh, but we're not here to test mksh.
|
|
it isn't toysh, so test for a bash alias.
|
|
|
|
I can't find any reference to $[ for arithmetic on the bash man page, but it
seems to be a synonym for $((. mksh doesn't support this, so the expand tests
that use it fail on Android. No other toybox tests are using $[.
|
|
|
|
The test only needs echo, and Android currently doesn't use mksh's
builtin printf; the toybox printf is fuller featured and less buggy,
but a lot slower to call in a loop like this (and mksh doesn't fall
back to the printf on the path if given something it can't handle,
so we can't have the best of both worlds).
Without this hack, the tail test takes as long as all the other
tests put together.
|
|
The test shouldn't assume there's a toybox binary on the path.
|
|
utimensat takes atime in [0] and mtime in [1], but since we're overwriting
with UTIME_OMIT, we actually want to flip the comparison so -a blats 1 and
-m blats 0.
|
|
busybox uudecode supports this, and POSIX explicitly mentions it (albeit
only in the "STDOUT" section). Plus Android doesn't have /dev/stdout and
/dev/stdin, so this lets us rewrite the uudecode tests so they pass on
Android too.
|
|
Also try to only kill processes we created.
|
|
Parsing file(1) output isn't a good way to determine file system type anyway.
|
|
Also make the cleanup kill more focused.
|
|
Also use a much stricter regex in the regex test to avoid killing innocent
bystanders.
|
|
|
|
check in two converted commands.
|
|
|
|
(or April 31 in any year). Some normalization allowed, exclusions are just
what http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/time.h.html says.
|
|
Also add trivial tests.
|
|
|
|
|