Commit Graph

187 Commits

Author SHA1 Message Date
Diomidis Spinellis
3b5adecb00 Updated results for bin/68981
PR:		bin/68981
2006-11-06 15:00:37 +00:00
Diomidis Spinellis
44d251df7a Regress.out is now regress.x.out. 2006-11-06 08:49:43 +00:00
Diomidis Spinellis
2c75d9c7ba Test the handling of supplied and default parameters. 2006-11-06 08:39:52 +00:00
Pawel Jakub Dawidek
d56da50ae8 Add tests for -t option with short tty name - pkill(1) should accept both
(eg. "ttyv0" and "v0").
2005-11-07 16:56:16 +00:00
Hartmut Brandt
8cc2581b3d Add first tests for semicolon handling. The first test fails. This is
probably a bug in the parser.
2005-10-18 07:28:09 +00:00
Hartmut Brandt
70ebfd0e40 Add more tests for escaped newline handling and fix a test that currently
should fail because of a bug in the parser (test 2).
2005-10-18 07:20:14 +00:00
Pawel Jakub Dawidek
b94557c2aa Add regression tests for '-L' option. 2005-08-25 20:13:58 +00:00
Pawel Jakub Dawidek
02a76f3fd7 '-F' option behaviour was reverted, so revert previous commit. 2005-08-25 20:11:39 +00:00
Pawel Jakub Dawidek
dfe47d36df '-F' option now needs locked pidfile. Modify regression tests respectively. 2005-08-24 19:39:29 +00:00
Garance A Drosehn
e9651b673d Correct one regression test (which was expected an incorrect answer), and
add a few more tests.  This matches bug fixes recently committed to 'env'.
2005-07-15 02:31:15 +00:00
Garance A Drosehn
2c87a19e7a Upgrade these regression tests to track recent changes to `env'.
Approved by:	re (blanket `env')
2005-06-21 21:43:38 +00:00
Garance A Drosehn
6cc00fe24c Add a suite of regression tests for all the recent changes to `env',
using my own script to handle it.  I wrote my own partially because
of all the quoting-issues involved with testing what I wanted to test,
and partially because this lets me commit one script and one data file,
instead of one-file-per-regression-test.

This suite was good enough for my initial testing (and it did help me
find a few bugs that would have otherwise been missed).  I'm not sure
how well it will work in general use, but I figured I might as well
commit it.  It won't *hurt* to have it available.  At the worst, people
can just ignore it.

Approved by:	re (blanket `env')
2005-06-20 04:17:12 +00:00
Hartmut Brandt
5878452aa9 Add a test for escaped newline handling. 2005-06-01 11:26:47 +00:00
Hartmut Brandt
6772dd14cb Add support for TODO tests. These are tests that are supposed to fail,
because of a make bug that should be fixed.
2005-06-01 11:25:38 +00:00
Hartmut Brandt
d9ea463fbf Change the test infrastructure so that tests are easier to maintain and
so that make(1) will run in an almost clean environment and enhance the
description of the test infrastructure.

Add the ability to have multiple tests carried out per test script.

Give some tests more meaningful names.

Fix the usage message from the test scripts.

Make it possible to pass several commands to the test scripts like:
'sh test.t setup run compare clean'.
2005-05-31 14:13:07 +00:00
Hartmut Brandt
cfc967e66a Add a test to check whether in compat mode make detectes builtins
on the command line and really executes the shell instead of directly
executing the command.
2005-05-20 15:25:04 +00:00
Hartmut Brandt
ac8946e3d3 Add a test to ensure that in compat mode when a line contains no
shell meta characters it is not passed to the shell, but the command
is executed directly (given that the line is not a shell builtin) and
that the line with a meta character is passed to the shell.
2005-05-20 15:06:27 +00:00
Hartmut Brandt
c9302692e6 Add a test that test whether we can replace the shell to use by
make with another shell and set all its parameters (meta and builtins
not tested here).
2005-05-20 14:50:30 +00:00
Hartmut Brandt
56f5aba2ca Some test cases for .SHELL target: builtin shell selection and
changing the path of a builtin shell.
2005-05-19 11:23:01 +00:00
Marcel Moolenaar
e108c3d726 o -n option added.
o  -x option added.
2005-05-15 07:35:34 +00:00
Hartmut Brandt
1b26a92962 Add an initial regression test suite for make(1).
Submitted by:	Max Okumoto <okumotu@ucsd.edu> (partly, initial version)
2005-04-28 13:20:48 +00:00
Stefan Farfeleder
a87ba6e923 Also test \0 in the format string. 2005-04-14 18:33:14 +00:00
Stefan Farfeleder
91e3aee000 Add a few regression tests for printf(1). 2005-04-13 20:08:17 +00:00
Pawel Jakub Dawidek
1897c44125 Add regression tests for pkill/pgrep.
MFC after:	3 days
2005-03-20 12:38:08 +00:00
Hartmut Brandt
012a8b3f81 Repo-copy tools/regression/usr.bin/make to tools/build/make_check
and adjust the path in the Makefile for the upgrade_checks target.
These checks are really feature upgrade checks that should be fast
and just find out whether we need to build a new make before
proceeding with other targets like buildworld. This makes the
place free for a real regression test suite in the old place.
2005-03-02 12:33:23 +00:00
Hartmut Brandt
89f087e8dd Fix builds with a read-only directory and a make upgrade. This is done
by forcing the creation of an object directory for the make regression
tests. Let make handle the tracking of the dependency and installation
of test_shell script.

Submitted by:	ru
2004-12-07 14:41:16 +00:00
Ruslan Ermilov
d29cf9e2f3 Make this work under debugging, e.g., "make -dl". 2004-12-06 08:51:30 +00:00
Hartmut Brandt
9c1f3ca3cf Make the tests runnable on a read-only src. To do this you must make sure
that you create one of the object directories make knows (see make(1)).
This uses the -C flag, so add a test that checks that make actually accepts
-C. Also fix the test that selects csh via the .SHELL target to work for
tcsh users too.

This commit renames shell_test to shell_test.sh. There is no history
to preserve so go without a repo-copy.

Reviewed by:	ru
2004-12-02 17:00:58 +00:00
Hartmut Brandt
60f801ee87 Chmod the shell testscript to be executable if it isn't already. According
to the CVS-Meisters x-mode just happens to work, but is not guaranteed to
do so. Try to be on the safe side.
2004-11-30 15:33:18 +00:00
Hartmut Brandt
7b54cdda4e Add some regression tests for the .SHELL target. I'm not sure that the
output of shell_2j is actually correct - it just tests what make currently
does. Make should switch on echoing for the second line, shouldn't it?
2004-11-25 10:03:29 +00:00
Nik Clayton
00e13b1d67 Switch over to a different, more flexible test output protocol that's
understood by Perl's Test::Harness module and prove(1) commands.

Update README to describe the new protocol.  The work's broken down into
two main sets of changes.

First, update the existing test programs (shell scripts and C programs)
to produce output in the ok/not ok format, and to, where possible, also
produce a header describing the number of tests that are expected to be
run.

Second, provide the .t files that actually run the tests.  In some cases
these are copies of, or very similar too, scripts that already existed.
I've kept the old scripts around so that it's possible to verify that
behaviour under this new system (in terms of whether or not a test fails)
is identical to the behaviour under the old system.

Add a TODO file.
2004-11-11 19:47:55 +00:00
Ruslan Ermilov
9a5cf32635 Add a regression test for the alternate shell specification. 2004-10-23 21:38:58 +00:00
Hartmut Brandt
215431deb0 Now that make more correctly handles variable assignments
in .MAKEFLAGS targets enable the regression test for this.
2004-08-12 19:14:10 +00:00
Diomidis Spinellis
30fd73fb81 Per letter dated July 22, 1999 remove 3rd clause of Berkeley derived
software (original contributor).

Reviewed by:	imp
2004-08-09 15:29:41 +00:00
Hartmut Brandt
cfe632eaba Back out something I'm working on that crept in with the last commit.
Spotted by: ru
2004-08-05 09:11:44 +00:00
Hartmut Brandt
82eb7072de Remove extra spaces. Remove double quotes around error messages -
they are not needed and will actually be printed.

Submitted by:	ru
2004-08-05 08:44:00 +00:00
Hartmut Brandt
c997f47be0 Add another test that checks for a working '+' command flag. 2004-08-05 07:24:06 +00:00
Hartmut Brandt
48ec21e7e6 Add a regression test for the passing of command line
variable assignments via the MAKEFLAGS environment variable.
2004-08-04 07:40:58 +00:00
Sean Kelly
528d980cc0 A new version that does exponents and lots of other neat things. Update
from the original author of math.sed.

Submitted by:	K S Braunsdorf <sed@ksb.npcguild.org>
2004-05-01 02:15:58 +00:00
Ruslan Ermilov
99d3652e69 Add a test for what was broken in rev. 1.28 and fixed in rev. 1.29
of make/str.c.
2004-01-30 09:46:28 +00:00
Ruslan Ermilov
9608d7e2cd Add a test for what was fixed in revs. 1.28 and 1.29 of make/str.c. 2004-01-29 22:51:36 +00:00
Ruslan Ermilov
21159d1687 Fix a bug that prevented exists() from finding "foo/", "foo/."
and "foo/.." when ".PATH: foo" was also given.

PR:		bin/34062
2003-10-02 21:30:30 +00:00
Diomidis Spinellis
37c94e1d78 Test 8.16 in sed.test tests the ability of a sed to handle an empty
regular expression as the first argument to a substitute command. If
used to test a sed which (erroneously) evaluates this at translation
time rather than at execution time, the bugged sed is put into an
infinite loop. This mode of failure seems excessive. Such a failing
sed is the Free Software Foundation's sed 3.02.

The specific test was also not being executed for the BSD sed.

Both problems are now fixed.

PR:		misc/25585
Submitted by:	Walter Briscoe <w.briscoe@ponl.com>
Approved by:	schweikh (mentor)
MFC after:	2 weeks
2003-07-22 19:22:08 +00:00
Ruslan Ermilov
c94d70434f Fixed broken arithmetic expression parser.
Reminded by:	bde
In memory of:	alane
2003-07-04 13:33:48 +00:00
Tony Finch
7d3a298ba9 Add tests for the behaviour of substitution when the regex can match
a zero-length string. This shows bugs in the s///g and s///2+ cases.
2003-06-04 15:26:23 +00:00
Garance A Drosehn
413a16d889 The regression-tests for 'make' *expect* to trigger make's warning:
warning: duplicate script for target "double" ignored
The regression-tests do try to hide that message, but the message does
still appear when using -j (eg: 'make -j5 buildworld').  This changes the
regression-test so the expected warning message will not be seen even
when -j is specified.

Reviewed by:	jmallett  ru
2003-02-10 19:56:42 +00:00
Ruslan Ermilov
be8b43b4c7 Add a test for what was fixed in revisions 1.39 and 1.50 of
make/parse.c (allow embedded `:' and `!' in target names).

Approved by:	re
2002-11-28 13:21:32 +00:00
Ruslan Ermilov
113cf9e649 Moved make(1) regression tests from src/Makefile to where they
belong (src/tools/regression/usr.bin/make), and use the latter
to test if make(1) is adequate for building the world.

Approved by:	re
2002-11-28 13:08:09 +00:00
Juli Mallett
5661d4a7b9 Hide the test in <target> under '.if make(<target>)' so as to not get any
errors/warnings related to crud in said test block.
2002-10-25 06:17:44 +00:00
Juli Mallett
89d22e2f06 As of revision 1.38 of make/parse.c, our make(1) will warn too. Note that
this isn't just for the sake of testing behaviour, and that things really
do break if this regression occurs.
2002-07-28 03:57:08 +00:00
Tim J. Robbins
54411faf6f Update another mention of <CR><CR> I missed the first time around (rev 1.2) 2002-07-04 05:16:19 +00:00
Tim J. Robbins
bfed7b6485 Note that two carriage returns aren't required after entering the
initial setup anymore (since process.c rev. 1.25). Add $FreeBSD$.

MFC after:	2 weeks
2002-07-03 14:42:53 +00:00
Juli Mallett
7588db83d2 The wrong y/// output got spammed into this file; from green@ indirectly. 2002-06-27 16:07:51 +00:00
Brian Feldman
e6acea8d1b Correct the psl regression test for sed(1)'s now-fixed newline
behavior.  Add the bcb regression test which checks for failures due
to a backslash ('\') coinciding with the very last character of the
command buffer.  The regression test is cf. this PR (which I did not
know about) and has a different fix for the bug.

PR:		bin/22351
Submitted by:	Stefan Duerholt <stefan.duerholt@t-online.de>
2002-06-27 15:58:59 +00:00
Juli Mallett
806893862d Erk, I forgot that regress.in has an ending newline, so change the test for
transliterate to use echo -n to supress newline and a simple string.
2002-06-26 16:57:36 +00:00
Juli Mallett
7afbc0985e Reduce internal code duplication, add REGRESSION_PASSFAIL([testname]) to
handle printing of the PASS/FAIL messages.  Suffix PASS/FAIL/FATAL with the
string (in $directory) where $directory is ${.CURDIR} from make(1), to
make it easier to use grep(1) and a bit of sed/awk to do statistics of
failure for some utilities over time, etc.
2002-06-25 12:40:04 +00:00
Juli Mallett
8c08ccea29 Add a regression test for transliterate which happens to match characters
at an EOL/EOF, and therefore should catch the broken behaviour fixed by
Tim J. Robbins in sed(1) recently.

Suggested by:	obrien
2002-06-25 12:10:09 +00:00
Juli Mallett
f0030ec090 I explicitly meant to not move any of this over to the new m4(1) framework,
even slightly.  Grrr CVS.
2002-06-24 14:29:19 +00:00
Juli Mallett
fa9fbb5f01 Move all remaining tests except for:
make(1):	Does not work like the other tests.  Its Makefile is
			self-testing.
	m4(1):		It uses complex voodo to test GNU m4(1) features.

To the new framework.  I had worried about passing the binary data that
uudecode(1)'s test passes to diff(1) might give a user something nasty,
but this is unlikely to happen as even with an unmodified old nasty
diff(1) which doesn't recognise many binary files, these binary files
are recognised.  Using $DIFF instead of `diff' in the library and making
it possible to override this with `cmp -s' might be nice some day, but
as of this second, there's no immediate need.
2002-06-24 14:22:44 +00:00
Juli Mallett
e51cc505de Add two new mostly freeform types of regression tests, and a macro for dying
ungracefully.
2002-06-24 14:19:57 +00:00
Juli Mallett
265056cbaa Comments to describe what these macros do, so that someone other than me
might be able to figure out how to write some of these tests (hint hint).
2002-06-24 13:58:20 +00:00
Juli Mallett
c178c79dd8 Convert straightforward regression tests to use regress.m4.
Goodbye, duplicated code, you will certainly not be missed.
2002-06-24 13:52:28 +00:00
Juli Mallett
d54336bd0d Add a simple (to be expanded) library of functions for the regression tests,
to handle the ones which output to stdout and have output in regress.$test.out,
etc.  More freeform macros should and will be written, but these are the most
prominent and most straightforward sort of tests we have around, so it makes
sense to try to accomodate them.
2002-06-24 13:51:30 +00:00
Juli Mallett
6d5fda5fd5 Grrr, make the test for embedded variables in the left-hand-side actually do
the right thing in every case.  Yuck.
2002-06-20 03:08:20 +00:00
Juli Mallett
0aa9e01c51 Add a test for what was fixed in revision 1.27 and 1.28 of make(1)'s var.c,
expansion of embedded variables in the left-hand-side of an assignment
expression, using the simplest case - hiding recursion using nil-expanded
variables.
2002-06-19 18:57:04 +00:00
Juli Mallett
cac5b46828 Add the m4(1) regression test. 2002-06-07 05:32:00 +00:00
Juli Mallett
ca982dadd5 Add a regression test for m4(1).
This checks the behaviour of changecom() in both GNU and BSD modes of our m4.
2002-06-07 05:31:32 +00:00
Juli Mallett
b30e60d8b4 Regenerate with new output grouping in uuencode -m. 2002-05-17 12:27:31 +00:00
Juli Mallett
a9b736ad72 Add a regression test for bin/5297, regarding sysv substitution with a nil
left-hand-side.
2002-05-05 19:02:30 +00:00
Juli Mallett
de8541ffe6 Add a test for the -R option. 2002-05-03 18:44:43 +00:00
Juli Mallett
af2c59f62e Regenerate -I output since an argument bogon in the -I code was fixed, among
other things.
2002-05-03 14:31:28 +00:00
Juli Mallett
4b7f276dfd Redirect stdin from the input file, rather than passing the input file to
uuencode(1), and set a umask, so that the mode in the header is predictable.

If it varies, then the test is right to fail.

Remove the note about this test falsely failing, with that in mind.
2002-04-27 03:11:33 +00:00
Juli Mallett
624abf8519 Prefix tests with PASS and FAIL, to make grepping easier, and note this in
the README.

This affects only the base-system regression tests, of course.
2002-04-27 02:26:23 +00:00
Juli Mallett
151740b470 For the P function, the newline must be considered a part of the pattern
space, so when printing it, don't let the pattern space and the output run
into eachother by omitting the \n when printing.
2002-04-21 01:27:05 +00:00
Juli Mallett
dd281fa589 Add sed(1) tests for proper behaviour of the G option as fixed in PR 26152,
and for proper behaviour of some sed functions given a nil pattern space,
as fixed in PR 34813.

The test for G was based on the test in the PR.  The nil pattern space test
is slightly different as we need to get *some* output, as the core dump will
also produce no output (old behaviour) and turn up falsely that the utility
is working fine.
2002-04-21 01:04:03 +00:00
Juli Mallett
6d3ca9de2c Check to see if make(1)'s handling of doubly-defined targets is busted or
not.  A lot relies on this.
2002-04-21 00:41:37 +00:00
Juli Mallett
533e28dbe1 Only exit at the end of a test, exit with the last value of $? that was not 0.
This way the entire regression test is looked at as a pass/fail, not just one
sub-test.
2002-04-21 00:18:29 +00:00
Juli Mallett
6541d27cad Add a test of variable evaluation and substitution for make(1), as a start
of tests for it.
2002-04-20 20:57:00 +00:00
Juli Mallett
3f288cae2d Add a test for jot(1). 2002-04-20 19:41:30 +00:00
Juli Mallett
3df2cd2cc9 A simple test for join(1) based on tjr's test case for -o 0.
Partially based on:	PR standards/36072
2002-04-20 19:33:23 +00:00
Juli Mallett
64928717a3 Add an exceedingly simple regression test for the file2c program. One would
hope that it would never regress, but this is a straightforward test, so add
it.
2002-04-20 19:01:21 +00:00
Juli Mallett
f8b175feba Add regression tests for parts of xargs(1). 2002-04-20 18:46:33 +00:00
Juli Mallett
2cf0f79dcb Add a comment regarding the file header, and the mode that the file is created
with.

This should be fixed shortly by adding the (desirable) option to set the file
creation mode on the command line.
2002-04-20 18:44:54 +00:00
Juli Mallett
4de8dc48de Add uuencode(1) and uudecode(1) regression test input and output. 2002-04-20 17:58:13 +00:00
Juli Mallett
88ef037391 Start adding framework for userland regression tests, and tests for
uuencode and uudecode.
2002-04-20 17:20:21 +00:00
Andrey A. Chernov
b7c6d4477a Make it at least semi-worked 1996-08-11 18:08:53 +00:00
Rodney W. Grimes
9b50d90275 BSD 4.4 Lite Usr.bin Sources 1994-05-27 12:33:43 +00:00