Commit Graph

280 Commits

Author SHA1 Message Date
Denis Vlasenko
cf26ab70c1 mdev: plug a few memory and fd leaks; simplify code a bit 2008-03-27 22:45:44 +00:00
Denis Vlasenko
e1caabbb75 mdev: add testsuite entry 2008-03-27 20:49:26 +00:00
Denis Vlasenko
08ec67bc62 patch: add support for -R. ~ +110 byte. By Pascal Bellard <pascal.bellard AT ads-lu.com>
fbsplash: new applet by Michele Sanges <michele.sanges AT otomelara.it

function                                             old     new   delta
fbsplash_main                                          -    1525   +1525
fb_drawfullrectangle                                   -     118    +118
static.param_value                                     -     100    +100
packed_usage                                       23776   23872     +96
applet_names                                        1843    1852      +9
applet_main                                         1120    1124      +4
read_line_input                                     3156    3158      +2
applet_nameofs                                       560     562      +2
applet_install_loc                                   140     141      +1
------------------------------------------------------------------------------
(add/remove: 3/0 grow/shrink: 6/0 up/down: 1857/0)           Total: 1857 bytes
   text    data     bss     dec     hex filename
 799233     641    7380  807254   c5156 busybox_old
 801202     641    7380  809223   c5907 busybox_unstripped
2008-03-26 13:32:30 +00:00
Denis Vlasenko
cc2965fd23 patch: fix vda's thinko: we need to open new_filename.orig, always!
plug memory leak; add testsuite

patch_main                                          1009     988     -21
2008-03-25 14:15:39 +00:00
Denis Vlasenko
cee01cfb2e diff: add testsuite entry for it 2008-03-24 20:33:47 +00:00
Denis Vlasenko
69ca5a70fd tail: fix fallout from tail -c optimization 2008-03-23 03:28:40 +00:00
Denis Vlasenko
45ecfc2f5c taskset: fix false failure in testsuite 2008-03-22 17:46:16 +00:00
Denis Vlasenko
d02db89244 clean up TODO file. No real code changes. 2008-03-17 09:05:21 +00:00
Denis Vlasenko
f39c7c0c86 sed: n cmd must reset "we had successful subst" flag. closes bug 1214. 2008-02-28 17:59:01 +00:00
Mike Frysinger
25cd7fd702 add a test case for usage strings to catch people forgetting to add trailing escape in middle of usage 2008-02-15 01:42:28 +00:00
Denis Vlasenko
3b92eaac53 sort: -z outputs NUL terminated lines. Closes bug 1591. 2008-02-13 14:30:33 +00:00
Denis Vlasenko
1e2a7e4ed1 test: fix mishandling of 'test ! arg1 op arg2 more args'; add testsuite 2008-02-09 05:48:42 +00:00
Denis Vlasenko
7ab3699b58 mkfs.minix: add testsuite; disable code which makes images variable 2007-12-02 08:55:34 +00:00
Denis Vlasenko
e2532ab5f2 dd: fix a bug where we don't report write errors
testsuite: small cleanup

full_write_or_warn                                    38      40      +2
write_and_stats                                       66      67      +1
dd_main                                             1358    1335     -23
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/1 up/down: 3/-23)             Total: -20 bytes
2007-12-02 01:44:42 +00:00
Denis Vlasenko
1796e2c495 dd: add testsuite entry for write errors 2007-12-02 01:43:18 +00:00
Denis Vlasenko
30297a5b83 fix vda's testsuite bogons, part 2 2007-11-26 07:23:27 +00:00
Denis Vlasenko
bd9a48bc9c fix vda's testsuite bogons, part 1 2007-11-26 07:23:09 +00:00
Denis Vlasenko
4e1e720523 testsuite: add tests for cut and grep;
slight improvements to infrastructure
2007-11-26 05:38:20 +00:00
Denis Vlasenko
6446c2d4ab which: fix testsuite failure
pidof: do not output empty line if nothing found
testsuite: disable false positive
2007-11-25 04:54:13 +00:00
Denis Vlasenko
8d0a734d91 tr: more of code shrink (getopt32-ification)
runtest: cleanup. Method of getting $applets was truly bizarre

function                                             old     new   delta
tr_main                                              655     527    -128
2007-11-13 22:23:57 +00:00
Denis Vlasenko
40276648ab sed: support GNU-like '\t' escape in substitutions 2007-11-13 16:48:10 +00:00
Denis Vlasenko
0beaff8c19 update Glenn McGrath's email address 2007-09-21 13:16:32 +00:00
Denis Vlasenko
3952f20c24 expand, unexpand: new applets from Tito <farmatito@tiscali.it> 2007-08-13 14:10:24 +00:00
Denis Vlasenko
8274e06677 sed: fix 'q' command handling ("Nguyen Thai Ngoc Duy" <pclouds@gmail.com>)
add testsuite entry for it. Fix applet order checker. Fix cmp yelling.
trylink: fix error file and map file generation
applets: fix applet order
2007-08-06 03:41:08 +00:00
Denis Vlasenko
de1c8b2e92 fix unpacker testsuite to match actual output 2007-07-18 18:47:13 +00:00
Denis Vlasenko
960eca66b5 awk: actually do "svn add" for testsuite 2007-07-18 18:33:18 +00:00
Denis Vlasenko
cd0df46d8c remove bashisms from testsuite 2007-06-05 22:29:14 +00:00
Bernhard Reutner-Fischer
eceecea568 - fix bug where we did not reject invalid classes like '[[:alpha'
- debloat while at it:
   text    data     bss     dec     hex filename
   1554       0      19    1573     625 tr.o.oorig
   1357       0      16    1373     55d tr.o
2007-03-30 14:43:27 +00:00
Denis Vlasenko
c86e052b81 fix accumulated whitespace and indentation damage 2007-03-20 11:30:28 +00:00
Denis Vlasenko
4b0bb9e0fd sed: fix very obscure case of escaped newline in sed command
(needed for uclibc build, btw). Add testcase for it.
2007-03-16 23:36:58 +00:00
Denis Vlasenko
36b7e28fa0 missed end-of-line 2007-03-07 23:08:26 +00:00
Denis Vlasenko
ab9eef21a5 bunzip2/gunzip/uncompress/unlzma: merge into common code -
fix few corner cases, reduce size by 450 bytes. Update testsuite.
2007-03-07 22:02:23 +00:00
Denis Vlasenko
018e085d44 stop using bash'isms ('function')
runtest: do not depend on busybox.links
2007-02-25 00:40:37 +00:00
Denis Vlasenko
54cf511ce1 sort: fix multiple -k (was ignoring all except last) 2007-02-17 18:11:45 +00:00
Denis Vlasenko
86811803e3 add to testsuite and fix yet another sed corner case 2007-01-29 17:10:19 +00:00
Denis Vlasenko
fe7a9f1277 sed: fix 2 bugs (one testsuite entry + one newly found)
but more importantly make code more understandable
2007-01-29 14:31:47 +00:00
Denis Vlasenko
826c85f382 fix all known regressions with sed and also make it simpler 2007-01-28 23:26:15 +00:00
Denis Vlasenko
dccb1a5343 wc can emit unpredictable amount of whitespace 2007-01-28 16:59:30 +00:00
Bernhard Reutner-Fischer
14813c5943 - add a very few simple test for sum.
The very first is currently broken
2007-01-27 22:07:54 +00:00
Bernhard Reutner-Fischer
70722ec4ce - pull taskset.tests from the busybox_scratch branch 2007-01-07 15:19:34 +00:00
Denis Vlasenko
8336f080cb diff: small optimizations; do not try to diff non-seekable stream
(currently we don't support that)
sort: fixes. testsuites fixed:
sort with non-default leading delim 1
sort with non-default leading delim 2
sort key doesn't strip leading blanks, disables fallback global sort
2007-01-07 00:21:41 +00:00
Denis Vlasenko
9213a9e0f2 whitespace cleanup 2006-09-17 16:28:10 +00:00
Denis Vlasenko
21afc7dc29 uuencode: common implementation for wget and uuencode (closing bug 694) 2006-09-03 15:49:40 +00:00
Denis Vlasenko
06ab5fb6b9 tar: tar xf foo.tar dir/dir did not extract all subdirs.
Added testsuite entry for this
2006-09-02 18:40:10 +00:00
Bernhard Reutner-Fischer
73561cc75a - pull from busybox_scratch: r15829:15850
Various fixes, cleanups and shrinkage:
saves 952 Bytes:
   text    data     bss     dec     hex filename
1087742   15853  790632 1894227  1ce753 ../busybox/busybox.old
1086790   15853  790632 1893275  1ce39b busybox
via:
# scripts/bloat-o-meter ../busybox/busybox_unstripped.old busybox_unstripped 
function                                             old     new   delta
ipcrm_main                                           756     822     +66
getval                                                 -      61     +61
maybe_set_utc                                          -      40     +40
udhcpc_main                                         2896    2912     +16
md5_hash_block                                       428     437      +9
opt                                                    8      16      +8
qgravechar                                           106     110      +4
make_bitmap                                          292     295      +3
inflate_unzip                                       2056    2059      +3
add_partition                                       1412    1414      +2
__parsespent                                         156     158      +2
qrealloc                                              41      42      +1
format                                                 -       1      +1
catv_main                                            313     314      +1
watch_main                                           293     292      -1
varunset                                              81      80      -1
part                                                   1       -      -1
check_if_skip                                        837     836      -1
start_stop_daemon_main                               840     837      -3
create_lost_and_found                                175     172      -3
supress_non_delimited_lines                            4       -      -4
static.l                                               4       -      -4
static.c                                               5       1      -4
bsd_sum_file                                         237     233      -4
eval2                                                338     332      -6
arithmetic_common                                    166     158      -8
cmpfunc                                               22       5     -17
cksum_main                                           294     275     -19
cmp_main                                             465     439     -26
dd_main                                             1535    1508     -27
rmmod_main                                           376     333     -43
cut_file                                             727     644     -83
ipcs_main                                           3809    3721     -88
cut_main                                             722     614    -108
date_main                                           1443    1263    -180
remove_ids                                           222       -    -222
------------------------------------------------------------------------------
(add/remove: 3/4 grow/shrink: 11/18 up/down: 217/-853)       Total: -636 bytes
2006-08-28 23:31:54 +00:00
Rob Landley
4795e4e011 Rich Filker spotted that sed -e 's/xxx/[/' didn't work right. Did a smaller
fix than his, and shrank the code a bit on top of that so the net size is
smaller, and added a test to the test suite for this case.  Plus I cleaned up
the #includes and removed unnecessary "const"s while I was there.
2006-07-26 17:25:08 +00:00
Rob Landley
12d9419273 Revert taskset for 1.2.0. It emits a warning, breaks building under RH9,
and nobody seemed interested in fixing it despite repeated complaints.
I'll worry about it in the 1.3 timeframe...
2006-06-30 22:20:43 +00:00
Rob Landley
641c3537c0 Add a test from Glenn. 2006-06-24 22:55:13 +00:00
Rob Landley
39218932b1 Fix bug found by Joey Hess and forwarded by Bastian Bunk. Add Joey Hess's
test case to the testsuite, plus another one that would have been broken by
the first attempt at a fix.
2006-06-15 20:50:38 +00:00
Rob Landley
cd82c3c041 Don't do workarounds for broken shells. Busybox is about to grow a shell that
we can run our own testsuite under, and I want it to handle the full range of
strange and peverted behavior you can find in real world shell scripts.
In the meantime, I'll just say #!/bin/bash in places that may care.
2006-06-15 20:07:57 +00:00
Bernhard Reutner-Fischer
16d3e4e0af - add applet taskset to set/retrieve the CPU affinity of a process
text    data     bss     dec     hex filename
    584       0       0     584     248 taskset.o.gcc-2.95
    509       0       0     509     1fd taskset.o.gcc-3.3
    505       0       0     505     1f9 taskset.o.gcc-3.4
    506       0       0     506     1fa taskset.o.gcc-4.0
    498       0       0     498     1f2 taskset.o.gcc-4.1
    495       0       0     495     1ef taskset.o.gcc-4.2-HEAD
2006-06-07 15:44:59 +00:00
Bernhard Reutner-Fischer
1e34731a6a - add testcase for grep bug (http://busybox.net/bugs/view.php?id=887)
The patch for bug #887 seems to work for me..
2006-06-04 18:40:48 +00:00
Mike Frysinger
9c03cb920a check for queueing dependancy dependancies typos 2006-05-26 01:41:04 +00:00
Mike Frysinger
3354487393 queuing is spelled correctly 2006-05-26 01:38:19 +00:00
Bernhard Reutner-Fischer
89a22ea5d9 make the testsuite a little less brittle:
- 'function fn_name\n{' breaks on older FreeBSD default shells, so use the more
  widely supported 'fn_name () {'. This needs more fixing..
- test for integers ought to use the proper operators
- test for strings ought to use quoting of the strings to be fair to strange
  implementations of test(1)
- make sure not to ignore return-codes != 0 from commands; Some shells exit
  immediately on this (much like explicitely requesting set -e in e.g. bash)

TODO:
*) Some older shells do not allow a space after the test-condition in an "if"
statement. This doesn't work:
if [ $status -ne 0 ] ; then
as opposed to this:
if [ $status -ne 0 ]; then
or this
if [ $status -ne 0 ]
then

*) strict spacing between commands. In some shells you have to say:
foo ; bar ; baz
The affected shells barf on stuff like ommitting the space, so this doesn't
work:
foo; bar   ;baz

*) $() vs. ``
The former isn't really portable as opposed to the latter.

*) fix frong assumption that the testsuite is run from the source-dir.
This is a complete misconception and renders the testsuite completely useless.


That said, i note that IMO a test-harness ought to do it's best to work in
a wide variety of environments, everything else defeats it's purpose.
2006-05-25 13:24:02 +00:00
Mike Frysinger
96087332e7 make sure script is executable 2006-05-06 05:27:19 +00:00
Rob Landley
42bd987e22 Add an "optional" line for FEATURE_READLINK_FOLLOW. 2006-05-05 22:22:30 +00:00
Rob Landley
c008c7440d New test from Natanael Copa. 2006-05-05 21:07:41 +00:00
Rob Landley
67d5b8b5b1 Minor tweaks: remove traces of old $COMMAND environment variable. 2006-05-02 21:39:04 +00:00
Mike Frysinger
02fe81033f detect more obsolete headers 2006-04-29 04:44:08 +00:00
Bernhard Reutner-Fischer
15545b1db9 - print "Obsolet headers" instead of "Obsolete function usage" when checking
for obsolet includes.
2006-04-28 19:53:48 +00:00
Rob Landley
d5b9428bb6 Re-wordwrap the new tests, and fix seq.c to pass them. 2006-04-27 22:36:32 +00:00
Bernhard Reutner-Fischer
a345dc855f - add two regression tests for seq.
"seq two arguments equal, arbitrary negative step" fails but should pass..
2006-04-27 13:46:56 +00:00
Rob Landley
998dbee6d9 Patch from Jean Wolter:
it looks like the introduced support for character classes and
equivalence classes is not correct. The attached patch tries to fix
some symptoms and tries to make tr behave like gnu tr for the added
test cases. The patch

 - removes if clauses with side effects
 - fixes handling of buffer pointer (strcat added characters to the
   buffer without increasing the buffer pointer)
 - re-arranges character classes to match ASCII order

regards,
Jean
2006-04-19 22:22:06 +00:00
Bernhard Reutner-Fischer
18260d5099 - typo: s/derefernce/dereference/g
Thanks to P.J. Day.
2006-04-18 14:17:49 +00:00
Bernhard Reutner-Fischer
074fe347b7 - add typo s/deamon/daemon/g 2006-04-18 11:15:19 +00:00
Bernhard Reutner-Fischer
9b68dbd878 - add grep for typo s/algorithic/algorithmic/g 2006-04-18 08:44:19 +00:00
Mike Frysinger
d017d73399 add a check for obsolete headers 2006-04-16 21:14:59 +00:00
Mike Frysinger
dbd8c3b295 add some tests for common typos and for obsolete functions 2006-04-16 06:09:46 +00:00
Rob Landley
3b84dfc2a8 Avoid spurious error message. (Technically applet order should be "SKIPPED"
when you move the testsuite directory outside of busybox and run it, but as
long as the test doesn't fail we're ok.)
2006-04-04 15:39:23 +00:00
Mike Frysinger
819b56b64a work outside of the srctree 2006-04-01 20:38:22 +00:00
Mike Frysinger
b0c5445bf5 new test for source code sanity 2006-04-01 01:36:32 +00:00
Mike Frysinger
5dd1236f49 move source code tests out into a sep file rather than just disabling/breaking them 2006-04-01 01:36:13 +00:00
Mike Frysinger
81834531aa remove bogus " 2006-04-01 01:35:52 +00:00
Mike Frysinger
2cf38523a1 silence error if busybox.links doesnt exist and run tests that begin with "all_" 2006-04-01 01:35:33 +00:00
Rob Landley
2324a7c9e5 Fix "seq 1 1". 2006-03-22 17:11:44 +00:00
Rob Landley
6bc10635f8 Make the new chroot environment creation infrastructure more flexible about
non-absolute paths.
2006-03-18 03:01:57 +00:00
Rob Landley
dcb2122e85 My mount testsuite. Not automatically run at the moment, need to figure out
how to (optionally) supply User Mode Linux to runtests.
2006-03-18 03:00:22 +00:00
Rob Landley
2824ded677 More test updates. 2006-03-16 16:02:06 +00:00
Rob Landley
4bb1b04fd1 Redo test suite to be able to test more than one command at a time. Eliminate
$COMMAND environment variable, instead put full command line (including
command to run) in second argument.  Modify $PATH to have test versions of
commands at start of path.  (Also more infrastructure for testing as root,
work in progress...)
2006-03-16 15:20:45 +00:00
Rob Landley
3a324754f8 I'm about to introduce tests that need to run as root (like mount.tests),
meaning we want to run them in a chroot environment.  To help with this,
I worked out a utility function that makes it really easy to set up a chroot
environment.
2006-03-09 22:04:33 +00:00
Rob Landley
93f2286e6e When gnu fails this one we shouldn't let it _hang_... 2006-03-01 16:32:35 +00:00
Rob Landley
e8e7811fb4 Yet more sed tests. Passing these is a to-do item for 1.1.2 or 1.2, not a
1.1.1 issue.
2006-03-01 16:32:01 +00:00
Rob Landley
5c22c11de2 Add a test suite for seq. 2006-02-24 01:45:58 +00:00
Rob Landley
6b6edf959d Lots of tests the fix to sed needs to pass... 2006-02-23 23:13:16 +00:00
Mike Frysinger
23ca7253be test to make sure applets are in alphabetical order 2006-02-22 23:38:57 +00:00
Rob Landley
5c1cd5fdd3 Putting together OPTIONFLAGS, sed needs the global flag to handle multiple
options.
2006-02-16 09:25:31 +00:00
Rob Landley
006fa2d45b When setting an environment variable by piping something into grep, backquotes
can be useful.  Also tweak an if case to be more portable.
2006-02-16 09:00:57 +00:00
Mike Frysinger
546a99db1d use LC_ALL, not LANG, for forcing C 2006-01-25 22:46:25 +00:00
Tim Riker
7d501a8673 ignore whitespace 2006-01-25 00:25:37 +00:00
Tim Riker
7dd4cbf2bf LANG=C should help 2006-01-25 00:17:47 +00:00
Rob Landley
990025a7d9 Ok, I've converted the contents of the "testing/sed" directory into a
sed.tests file.  My brain hurts now.  (Lots of boggling at sed minutiae and 
corner cases and going "why is gnu giving that output".  The behavior of N 
and n with regard to EOF are only understandable if you read the Open Group 
spec, not if you read the sed info page, by the way...)

Some of the existing sed tests are just nuts.  For example, sed-next-line is 
testing for our behavior (which is wrong), and would fail if run against gnu 
sed (which was getting it right.  Again, this was a spec-boggling moment, 
with much head scratching.  I've got to add a debug mode where the stuff 
output by the p command is a different color from the stuff output by normal 
end of script printing (when not suppressed by -n).)

As for sed-handles-unsatisifed-backrefs: what is this test trying to _do_?  I 
ran it against gnu sed and got an error message, and this behavior sounds 
perfectly reasonable.  (It _is_ an unsatisfied backref.)  The fact we 
currently ignore this case (and treat \1 as an empty string) isn't really 
behavior we should have a test depend on for success.

The remaining one is sed-aic-commands, which is long and complicated.  I'm
trying to figure out if I should chop this into a number of smaller tests, or
if having one big "does-many-things" test is a good idea.

In any case, the _next_ step is to go through the Open Group standard and
make tests for every case not yet covered.  (And there are plenty.  There
are few comments in the file already.)  Plus I have notes about corner
cases from development that I need to collate and put into here.  This file
is maybe the first 1/3 of a truly comprehensive sed test.

Rob
2005-11-10 06:26:40 +00:00
Rob Landley
c98a359a16 It was a bit out of date. 2005-11-07 09:06:34 +00:00
Rob Landley
48c6157eb9 Fix the test suite so that individual *.tests files can be run ala
COMMAND=sort ./sort.tests
So we can compare against non-busybox versions, and possibly our testsuite
will be useful to somebody like the Linux Test Project someday.

Redid testing.sh to add new command, "optional", to skip tests that require
certain features.  (use: `optional FEATURE_SORT_BIG`, or `optional ""` to
stop skipping.)  Note that optional is a NOP if the environment variable
"OPTIONFLAGS" is blank, so although we're marking up the tests with busybox
specific knowledge, it doesn't interfere with running the tests without
busybox.

Moved setting the "OPTIONFLAGS" environment variable to runtest.  Philosophy:
busybox-specific stuff belongs in runtest; both testing.sh and the tests
themselves should be as busybox-agnostic as possible.

Moved detecting that a command isn't in busybox at all (hence skipping the
entire command.tests file) to runtests.  Rationale: optional can't currently
test for more than one feature at a time, so if we clear anything with
optional "" we might perform tests we don't want to.

Marked up busybox.tests to know which tests need CAT enabled.  Fixed up other
tests to be happy with new notation.

I suspect egrep should be appended to grep.  It's a sub-feature, really...
2005-11-07 08:50:53 +00:00
Bernhard Reutner-Fischer
82338d8460 - add a few basic tests for pidof(8) 2005-10-06 12:50:11 +00:00
Bernhard Reutner-Fischer
e34e8782a9 - support make check V=1 to run the checks in verbose mode
- pass verbose from runtest to testing.sh
2005-10-06 12:48:03 +00:00
Mike Frysinger
3f91d7a9f6 cleanup option parsing 2005-09-24 00:52:58 +00:00
Bernhard Reutner-Fischer
23bc647b35 - remove dangling symlinks after the runs
- check if the temporary directory containing the links exists rather
  than unconditionally creating it for every single applet.
2005-09-23 17:42:33 +00:00
Bernhard Reutner-Fischer
1eb645d8d7 - set executable bit 2005-09-23 15:56:39 +00:00
Bernhard Reutner-Fischer
b47a74f4e7 - introduce variable _BB_CONFIG_DEP to the new test harness.
This is used to see if given tests should be run (are available) or not.
  Print "UNTESTED: descr" if the applet or feature is not available.
- add _BB_CONFIG_DEP to existing new.tests
- move old grep test to new test infrastructure and add a few more test for
  grep.
2005-09-23 15:44:46 +00:00
Rob Landley
52d2f4bd90 Get "make check" ($srcdir) to work with the new testsuite. 2005-09-20 18:19:34 +00:00
Rob Landley
90252bb4c9 The testsuite/links directory wasn't being created. 2005-09-20 14:09:57 +00:00
Rob Landley
1e51925684 Test full susv3 spec for uniq (except internationalization).
I think this covers it.  We fail two corner cases, both of which are explicit
violations of the spec, and both of which gnu passes.
2005-09-14 14:36:40 +00:00
Rob Landley
14efdc58ce Don't comment warnings. Don't put #warnings about warnings. _FIX_ warnings.
This fixes the warning, and makes the binary smaller out of sheer pique.
(Yes, since Manuel did this one it's nice tight code that took several
attempts to shrink, but I was ticked.)

Add the start of a test for uniq; this is about the first 1/3 of the
tests we need for full susv3 coverage of uniq.
2005-09-07 04:18:36 +00:00
Rob Landley
f6acb660ea Regarding 11330: when you fix a bug that the testsuite doesn't catch, add
a test case to the test suite.
2005-09-05 16:27:19 +00:00
Rob Landley
a1a1a9fa2c Remove trailing crud from busybox.tests. (Sleep deprivation strikes again...) 2005-09-04 11:13:10 +00:00
Rob Landley
b766c39456 General cleanup of command line parsing to allow "busybox" to work as a prefix.
(I.E. any argv[0] that starts with "busybox" winds up in busybox_main().)

Added testing/busybox.tests which tests the following permutations:

./busybox
./busybox-suffix
./busybox cat
./busybox-suffix cat
./busybox --help
./busybox-suffix --help
./busybox --help cat
./busybox-suffix --help cat
./busybox --help unknown
./busybox-suffix --help unknown
./unknown

Also repair the test suite so ./runtest calls the ".tests" scripts properly.

Note: you can now go "busybox busybox busbox ls -l" and it'll take it.  The
new code is pretty generic.  I can block that if anybody can come up with a
good reason to...
2005-09-04 11:10:37 +00:00
Rob Landley
7f90ae436f This goes along with the new testsuite code... 2005-09-02 01:55:58 +00:00
Rob Landley
1689075c99 Working on a new test harness. Moved the sort tests into it. 2005-09-02 00:41:53 +00:00
Rob Landley
93850a56b2 Patch from Colin Watson (mangled slightly by Rob Landley):
This patch implements the 'T' command in sed. This is a GNU extension,
but one of the udev hotplug scripts uses it, so I need it in busybox
anyway.

Includes a test; 'svn add testsuite/sed/sed-branch-conditional-inverted'
after applying.
2005-05-18 06:34:37 +00:00
Eric Andersen
7daa076d3e egor duda writes:
Hi!

I've created a patch to busybox' build system to allow building it in
separate tree in a manner similar to kbuild from kernel version 2.6.

That is, one runs command like
'make O=/build/some/where/for/specific/target/and/options'
and everything is built in this exact directory, provided that it exists.

I understand that applyingc such invasive changes during 'release
candidates' stage of development is at best unwise. So, i'm currently
asking for comments about this patch, starting from whether such thing
is needed at all to whether it coded properly.

'make check' should work now, and one make creates Makefile in build
directory, so one can run 'make' in build directory after that.

One possible caveat is that if we build in some directory other than
source one, the source directory should be 'distclean'ed first.

egor
2004-10-08 07:46:08 +00:00
Glenn L McGrath
c6a99b993d Add two fundamental tests for copying directories 2004-04-18 13:35:56 +00:00
Eric Andersen
5c1ee519ea Minor tar test update 2004-04-06 11:34:02 +00:00
Eric Andersen
650fe63467 Kill off the old 'tests' stuff. Write a ton of new tests for the
'testsuite' dir.  Fix a bunch of broken tests.  Fix the testsuite
'runtest' script so it actually reports all failures and provides
meaningful feedback.
 -Erik
2004-04-06 11:10:30 +00:00
Eric Andersen
c354f6ee54 Fix the test suite script so it actually works and actually flags
all errors as such.  Make verbose mode exit on FAIL and provide a
printout of the failed test run.
2004-04-06 00:41:39 +00:00
Eric Andersen
b2e267f153 Some test additions 2004-04-05 18:46:24 +00:00
Glenn L McGrath
ce91c8ac2b Isolate code better for unused options, config option to enable long
options, add some conditions to the tar tests in testsuite.
2003-12-26 14:01:37 +00:00
Glenn L McGrath
d9c8ab40a4 Update status of tests which should pass 2003-11-20 09:57:44 +00:00
Glenn L McGrath
3a2fcc63b8 remove controversial tests 2003-11-20 09:56:34 +00:00
Glenn L McGrath
2570b43e82 Configuration option to define wether to follows GNU sed's behaviour
or the posix standard.
Put the cleanup code back the way it was.
2003-09-16 05:25:43 +00:00
Glenn L McGrath
204ff1cea4 Fix a bug that creapt in recently with substitution subprinting, and add
a test for it.
2003-09-16 01:46:36 +00:00
Glenn L McGrath
977451ef44 Fix a simple mistake with pattern space, and add a test for it 2003-09-15 12:07:48 +00:00
Glenn L McGrath
2eed0e2d47 Add a test for the 'P' command and fix current implementation so it
doesnt permanently modify the pattern space.
2003-09-15 06:28:45 +00:00
Glenn L McGrath
6e5687abc3 A test and fix for the sed 'n' command 2003-09-15 06:12:53 +00:00
Glenn L McGrath
7b35121297 Test for use of newline in regex's, this feature is used by most
configure scripts.
2003-09-15 05:53:28 +00:00
Glenn L McGrath
65f9dc01f3 Test the N command 2003-09-15 05:35:47 +00:00
Glenn L McGrath
ba5eb27ce3 Check sed doesnt go into an infinite loop (yes it does) 2003-09-15 04:41:17 +00:00
Glenn L McGrath
7bf8f5bc5e Update sed branch tests 2003-09-14 11:10:08 +00:00
Glenn L McGrath
8a0b59fb82 Add two new tests, sed-recurses-properly should always work 2003-09-14 09:38:24 +00:00
Matt Kraai
0861e828d0 Handle -O preceding -x. 2003-05-18 21:12:36 +00:00
Eric Andersen
65ddf77fbd Patch from Tito to rework strings applet, and some testsuite
stuff to test it added by me.
2003-01-13 23:19:31 +00:00
Glenn L McGrath
9c802416ab left out a \" 2002-11-28 00:51:38 +00:00
Glenn L McGrath
73ceca275e This test was hanging 2002-11-28 00:47:49 +00:00
Matt Kraai
3ad88ccf2d * testsuite/sed/sed-recurses-properly: Mark XFAIL. 2002-06-11 13:29:08 +00:00
Matt Kraai
a0782684fd * archival/bunzip2.c (bunzip2_main): Do not remove files if writing to standard
output.
* testsuite/bunzip2/bzcat-does-not-remove-compressed-file: New.
2002-04-15 15:01:37 +00:00
Eric Andersen
3e6908b586 Sed can go into an infinite loop 2002-04-13 13:18:15 +00:00
Matt Kraai
5c69cd84ff * editors/sed.c (process_file): Stop processing deleted lines.
* testsuite/sed/sed-does-not-substitute-in-delete-line: New.
2002-04-01 16:17:37 +00:00
Matt Kraai
8a8308f129 * testsuite/which/which-uses-default-path: Remove extra echo. 2002-03-27 23:19:17 +00:00
Matt Kraai
66388f89a5 * testsuite/grep/egrep-supports-extended-regexps: Check exit status instead
of output.
2002-03-27 22:56:19 +00:00
Matt Kraai
50aec98e1c * testsuite/bunzip2/bunzip2-reads-from-standard-input: Remove -c flags.
* testsuite/gunzip/gunzip-reads-from-standard-input: Likewise.
2002-03-27 22:48:39 +00:00
Matt Kraai
6feaeace86 * testsuite/COPYING: Remove. 2002-03-27 22:43:47 +00:00
Matt Kraai
cf32ac543c * archival/bunzip2.c (bunzip2_main): Remove compressed file.
* testsuite/bunzip2/bunzip2-removes-compressed-file: New.
2002-03-27 17:46:44 +00:00
Matt Kraai
35d60421b4 * testsuite/runtest (run_applet_testcase): Return test case status, not
process ID.
2002-03-27 17:33:31 +00:00
Matt Kraai
9cdb0601eb * archival/bunzip2.c: Include <unistd.h>.
(bunzip2_main): Read data from standard input if FILE argument is `-' or
  omitted.
* include/usage.h (bunzip2_trivial_usage, bunzip2_full_usage): Rewrite.
* testsuite/bunzip2/bunzip2-reads-from-standard-input: New.
2002-03-27 17:31:01 +00:00
Matt Kraai
aee53f4604 * testsuite/grep/egrep-is-not-case-insensitive: Require
CONFIG_FEATURE_GREP_EGREP_ALIAS.
2002-03-19 23:47:49 +00:00
Matt Kraai
b3de66869b * testsuite/grep/grep-handles-binary-files: Read input from a pipe.
* testsuite/grep/grep-matches-NUL: Likewise.
2002-03-19 23:46:16 +00:00
Matt Kraai
0efab3319d * networking/wget.c (parse_url): Allocate a string for the empty path.
* testsuite/wget/wget-handles-empty-path: New.
2002-03-19 15:22:42 +00:00
Matt Kraai
fa144713b8 * testsuite/runtest (show_result): Change UPASS to XPASS.
(run_applet_testcase): Likewise.
2002-02-19 23:54:42 +00:00
Matt Kraai
6b140ea5a9 * testsuite/README: Change "UNSUPPORTED" tag to "FEATURE".
* testsuite/runtest (run_applet_testcase): Likewise.
* testsuite/cp/cp-preserves-hard-links: Likewise.
* testsuite/grep/egrep-supports-extended-regexps: Likewise.
* testsuite/grep/grep-is-also-egrep: Likewise.
* testsuite/tar/tar-archives-multiple-files: Likewise.
* testsuite/tar/tar-handles-empty-include-and-non-empty-exclude-list:
  Likewise.
* testsuite/tar/tar-handles-exclude-and-extract-lists: Likewise.
* testsuite/tar/tar-handles-nested-exclude: Likewise.
2002-02-19 23:43:08 +00:00
Matt Kraai
7c71822809 * testsuite/runtest (run_applet_testcase): Return UNTESTED instead of
UNSUPPORTED for missing applets and features.
2002-02-19 23:38:08 +00:00