aboutsummaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2017-05-11Make fewer assumptions about the shell in echo.test.Elliott Hughes
This test fails with mksh, but we're not here to test mksh.
2017-04-26Elliott wants to run the toybox tests on android host and there's an sh butRob Landley
it isn't toysh, so test for a bash alias.
2017-04-25Forgot to check in one of the files for bzcat.testRob Landley
2017-04-17Use $(( rather than $[ for arithmetic in expand.test.Elliott Hughes
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 $[.
2017-04-17Make ls.test work without awk.Elliott Hughes
2017-04-15Speed up tail.test for shells without builtin printf.Elliott Hughes
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.
2017-04-11Fix "make test_split".Elliott Hughes
The test shouldn't assume there's a toybox binary on the path.
2017-04-11Fix touch -a/-m (and add the missing tests).Elliott Hughes
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.
2017-04-10Add "uudecode -o -" support.Elliott Hughes
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.
2017-04-07Make renice.test work without awk.Elliott Hughes
Also try to only kill processes we created.
2017-04-07Remove mount.test awk dependency.Elliott Hughes
Parsing file(1) output isn't a good way to determine file system type anyway.
2017-04-07Make pgrep tests runnable on toybox-only systems.Elliott Hughes
Also make the cleanup kill more focused.
2017-04-07Make pkill tests runnable on a toybox-only system.Elliott Hughes
Also use a much stricter regex in the regex test to avoid killing innocent bystanders.
2017-04-07Make bzcat tests runnable on a toybox-only system.Elliott Hughes
2017-04-04Add "testcmd" function as an alternative to "testing" for tests/*.test, andRob Landley
check in two converted commands.
2017-04-03Fix ls -a and ls -A tests.Elliott Hughes
2017-03-28New date range tests are simple, won't catch Feb 29 in non-leap-yearRob Landley
(or April 31 in any year). Some normalization allowed, exclusions are just what http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/time.h.html says.
2017-03-22Implement uptime -s.Elliott Hughes
Also add trivial tests.
2017-03-20Paste bugfix, more tests.Rob Landley
2017-03-20Rewrite paste so it actually works.Rob Landley
2017-01-09More pending shell tests.Rob Landley
2016-12-25Add test for last sort commit.Rob Landley
2016-10-20Add special "touch -" behavior and require an argument.Rob Landley
2016-10-19More touch tests, and a fix found by one. (The three -t formats can onlyRob Landley
reliably be distinguished by checking length, because %H amd %m and such can match different numbers of digits.)
2016-10-18Add a printf test that shows a bug.Rob Landley
2016-10-18Unify touch -t and -d handling, allow posix's underspecified "time designator"Rob Landley
T to be a space instead (because the posix says so, no idea why), initialize default values reliably including zeroing daylight savings time field (which is handled inconsistently by libc and just screws stuff up).
2016-10-17A few more sed tests.Rob Landley
2016-09-13Add -h and -L to file.Elliott Hughes
On a toybox system, most of your bin directory is symbolic links. Bug: http://b/31294746
2016-09-06Teach sed s/// how to handle [:space:] type sequences.Rob Landley
Or more accurately, s@[[:space:]@]@replace@ which can't treat the @ in [] as a delimiter but has to know about nested [[]] to make that decision.
2016-09-05Fluff up cmp tests.Rob Landley
2016-08-06Inline setup_inout(), test ftruncate() return value, move gettimeofday() beforeRob Landley
seek so seek time is included in total.
2016-07-23Many failing tests I need to fix grep to pass while adding --color.Rob Landley
2016-07-21Common test infrastructure says command name, don't have sed.tests say 'sed sed'Rob Landley
2016-07-18Add getfattr(1) and setfattr(1).Elliott Hughes
Plus basic tests.
2016-07-14Add -c to md5sum and sha1sum.Rob Landley
2016-07-08dd improvements.Elliott Hughes
Support hex (requested by users). Support status=noxfer and status=none (requested by users). Fix status output. Clarify large numbers in --help output. Use O_TRUNC rather than ftruncate unless we're also seeking. New tests. Also partial cleanup (reuse of existing code, removal of non-GLOBALS globals, and merge dd_main and do_dd).
2016-07-08Fix typo in chattr test.Elliott Hughes
2016-07-05Implement xxd -s.Elliott Hughes
2016-07-04Fix chattr and date tests.Rob Landley
2016-07-04Fix a bug (octal digits are 0-7, not 0-8) and deal with a case where posixRob Landley
is explicitly outright insane (%b handles octal escapes differently for no obvious reason).
2016-06-30Teach wc to do -cm together. Fix testsuite so TEST_HOST passes too.Rob Landley
2016-06-04Basic success/failure return from pgrep/pkill.Elliott Hughes
The man page says they also return 2 for syntax errors and 3 for "fatal error: out of memory etc", but I don't know how to implement that and don't need it (or have any reason to believe anyone needs it). Bug: 29092208
2016-05-23Fix remaining pkill tests.Elliott Hughes
I don't know that anyone cares, but these failures made me think I'd broken something while testing the -SIGNAL patch. The -s parsing wasn't taking into account that -s 0 is a special case, and the -o test was assuming that pkill can tell the difference between two processes started at roughly the same time. Hopefully there's higher-resolution data available that can avoid the need for yet another sleep in the tests.
2016-05-05"top -b -n1" should end with a newline.Elliott Hughes
The use of TT.time to determine whether to use \r or \n is a little odd, but let's stick with that for now. Correct the spelling of millitime and add a test.
2016-04-25Fix find bug reported by Tom Marshall, add test for it, and while we're at itRob Landley
fix two tests looking for a too-specific error message (so TEST_HOST failed).
2016-04-23Add the non-tty more(1) test.Elliott Hughes
(This was supposed to be in the earlier patch, but I was fooled by "git commit -a" yet again...)
2016-04-23Remove inappropriate bzip tests (we're not comparing with random "host version")Rob Landley
replace with testing 2 known files out of blkid tests, and add badcrc test.
2016-04-21Fix touch -t seconds parsingDavis Mosenkovs
2016-04-20Start of shell tests: $(()) and $'' expansion.Rob Landley
2016-04-16Fix tail -NUM again.Elliott Hughes
This time with a test.