Commit graph

77 commits

Author SHA1 Message Date
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