Commit Graph

166 Commits

Author SHA1 Message Date
obrien
262e4e322b Add a test for the :tl & :tu modifiers. 2012-06-12 23:16:00 +00:00
obrien
ffd816d2cd Add regression test for '-V' command line option (requires r236346). 2012-05-31 01:07:52 +00:00
obrien
2c3aca1390 make it easier to test newly-built make. 2012-05-30 22:26:16 +00:00
bapt
913116490c Import byacc from invisible island, it brings us lots of compatibilities with
bison, keeping full compatibility with our previous yacc implementation.

Also bring the ability to create reentrant parser

This fix bin/140309 [1]

PR:		bin/140309 [1]
Submitted by:	Philippe Pepiot <ksh@philpep.org> [1]
Approved by:	des (mentor)
MFC after:	1 month
2012-05-21 13:31:26 +00:00
bapt
4f1c723060 Import m4 regression tests from OpenBSD
Obtained from:	OpenBSD
Approved by:	des (mentor)
2012-04-30 22:00:34 +00:00
fjoe
4475fc98c1 Include target names in diagnostic output.
Submitted by:	Garrett Cooper
2012-02-12 05:34:01 +00:00
das
4f141c7da6 These tests check whether the compiler evaluates floating-point
expressions properly.  Some of the tests depend on the compiler
implementing C99's FENV_ACCESS pragma, and only commercial compilers
do; those tests are currently skipped.  If any of the enabled tests
fail, then odds are the libm regression tests will fail also.
This should make it easier to diagnose reported problems on platforms
I don't have.

Currently, gcc passes all the tests that don't depend on FENV_ACCESS
on amd64 and sparc64.  Clang fails a few on amd64 (see clang bug
11406).  Both gcc and clang fare poorly on i386, which has well-known
issues.
2012-01-20 06:57:21 +00:00
uqs
8f1a296b8b Spelling fixes for tools/
Add some $FreeBSD$ tags so svn will allow the commit.
2011-12-30 00:04:11 +00:00
fjoe
53c115f838 Fix last-minute typo. 2011-12-15 06:12:43 +00:00
fjoe
be25e9caaf Add job error output test.
make(1) with openpty() currently fails this test: there's a race condition
and error output is sometimes lost.
2011-12-15 06:01:06 +00:00
fjoe
dbe3a72999 Add three execution tests for make(1):
- plus: execute "+command" when run with -jX -n
- ellipsis: ellipsis ("...") from variable
- empty: empty command (from variable)

Currently make(1) fails all three tests:
- plus: segmentation fault due to incorrect command list handling
- ellipsis: works in compat mode but fails in job (-jX) mode
- empty:
        - compat mode: prints error message
	- job mode: works but prints empty string
2011-11-30 05:49:17 +00:00
jilles
979af05e77 printf: Allow multibyte characters for '<char> form, avoid negative codes.
Examples:
  LC_ALL=en_US.UTF-8 printf '%d\n' $(printf \'\\303\\244)
  LC_ALL=en_US.ISO8859-1 printf '%d\n' $(printf \'\\344)
Both of these should print 228.

Like some other shells, incomplete or invalid multibyte characters yield the
value of the first byte without a warning.

Note that there is no general way to go back from the character code to the
character.
2011-05-28 11:37:47 +00:00
jilles
742083bfc4 sed: Add test for r217133 (-i race).
PR:		bin/153261
MFC after:	2 weeks
2011-01-08 00:06:22 +00:00
jilles
b69863b7fd printf: Test that the "--" option terminator works. 2010-12-08 22:54:18 +00:00
jilles
26abe50bf1 tr: Fix '[=]=]' equivalence class.
A closing bracket immediately after '[=' should not be treated as special.

Different from the submitted patch, a string ending with '[=' does not cause
access beyond the terminating '\0'.

PR:		bin/150384
Submitted by:	Richard Lowe
MFC after:	2 weeks
2010-09-29 22:24:18 +00:00
maxim
03bbab0211 o The typo was intended as it stated in the comment. Revert last.
Spotted by:	dfr
2010-06-04 14:22:49 +00:00
maxim
34798567b5 o Fix typo: .uudef -> .undef.
PR:		misc/147462
Submitted by:	Erik Cederstrand
2010-06-04 08:14:30 +00:00
brian
cb476e3fa5 Fix stuttering sequences and reverse ranges
PR:		123635
Submitted by:	Ulrich Spörlein, uqs at spoerlein dot net
2010-06-02 07:47:29 +00:00
edwin
9792f6e953 Replace -b with -C and -B (as proposed by Alexander).
Add -3, -A and -B to the usage.
Update regression test for the new parameters.
2010-03-21 21:33:21 +00:00
edwin
6e7859d3d9 Create regression tests for ncal:
- A couple of tests to check if the layout of the generated calenders
  is correct.

- A couple of tests to see if impossible combinations for -3, -A,
  -m, -y etc properly abort.

- A couple of test to confirm that the order of -A, -B, -3 etc give
  the right number of months.
2010-03-14 10:24:03 +00:00
jh
ba646ecd6f - Use errx(3) instead of err(3) when checking if snprintf(3) succeeded.
snprintf(3) doesn't set errno in the tested cases.
- If the same argument reference (for example %1) was specified more than
  once, the command didn't necessarily fit to the final command buffer. Fix
  this using a dynamic sbuf buffer. Add a few regression tests for the case.

PR:		bin/95079
No objections:	freebsd-hackers
2010-03-05 15:23:01 +00:00
uqs
89a7a155da Add missing newline in last line of file.
Uncovered via:	fromcvs vs. svn
Approved by:	ed (co-mentor)
2010-02-16 09:10:21 +00:00
pjd
b7ae6c5559 - Implement -q option for pgrep(1).
- Add regression test to test -q option.
2010-02-12 18:52:24 +00:00
obrien
d2744b88e9 Add ability to search up the directory hierarchy for the system directory.
Do by specifying ".../" with '-m' or MAKESYSPATH (new) environment variable.

Reviewed by:	<sjg@NetBSD.org>
Obtained from:	NetBSD (+ embellishment by me, sent back to NetBSD)
2010-01-04 18:57:22 +00:00
obrien
0eb7553bed Fix formatting. 2010-01-04 11:11:37 +00:00
obrien
9085cab1b2 There are actually 129 tests here. 2010-01-04 11:00:12 +00:00
obrien
c08a21642c Catch up with UNIX98-style PTY's. 2010-01-04 10:59:14 +00:00
obrien
ed014ff383 'prove -r' isn't as smart as grog thought. 2010-01-04 10:58:08 +00:00
obrien
7c3c566c89 You need to be root to run this test. 2010-01-04 09:59:18 +00:00
obrien
f34b58c695 Don't process 'lastcomm' if "AUTOMATED" is defined.
The tests for it require manual setup.
2010-01-04 09:54:24 +00:00
obrien
4e434d007d It is expected these are chmod +x. 2010-01-04 09:50:30 +00:00
obrien
9f5a22f4e5 Regression test for r201456. 2010-01-04 09:49:23 +00:00
obrien
8ab1021a62 Provide clean output with 'prove -r'. 2010-01-03 11:53:48 +00:00
jh
6f2f9130ae Don't read the newline character to line buffer because lines are passed
to wcscoll(3). Newline characters could cause incorrect results when
comparing lines.

Also, if an input line didn't contain a newline character, it was
omitted from the output. According to my interpretation, SUSv3 requires
that the newline is always printed.

Add regression tests for the cases. [1]

PR:		bin/140976
Submitted by:	D'Arcy Cain (original version) [1]
Approved by:	trasz (mentor)
2009-12-12 18:18:46 +00:00
dds
5ce4473a06 IEEE Std 1003.1, 2004 Edition states:
"The escape sequence '\n' shall match a <newline> embedded in
the pattern space."

It is unclear whether this also applies to a \n embedded in a
character class.  Disable the existing handling of \n in a character
class following Mac OS X, GNU sed version 4.1.5 with --posix, and
SunOS 5.10 /usr/bin/sed.

Pointed by:	Marius Strobl
Obtained from:	Mac OS X
2009-09-20 15:47:31 +00:00
dds
668711df00 Follow POSIX (IEEE Std 1003.1, 2004 Edition) in the implementation
of the y (translate) command.

"If a backslash character is immediately followed by a backslash
character in string1 or string2, the two backslash characters shall
be counted as a single literal backslash character"

Pointed by:	Marius Strobl
Obtained from:	Mac OS X
2009-09-20 15:17:40 +00:00
dds
cc9cdb30b3 Add correct test results. 2009-09-20 15:04:50 +00:00
dds
41d12566f0 Describe how other systems treat this case. 2009-09-20 14:20:00 +00:00
dds
96199e6b70 Allow [ to be used as a delimiter.
Pointed by:	Marius Strobl
Obtained from:	Apple
2009-09-20 14:11:33 +00:00
dds
317812e953 The transition to Subversion allows us to rename files without
repo-copy hacks.
Remove the test-number prefix from the name of the output files,
so that new test cases can be easily added.
2009-09-20 13:39:44 +00:00
brian
446d01edc9 Fix some uninitialise variables.
PR:		136383
Submitted by:	Ulrich Spoerlein - uqs at spoerlein dot net
Approved by:	re (kib)
MFC after:	3 weeks
2009-07-08 10:16:16 +00:00
brian
83ffdaf9f5 Regression test the 'addr1,+N' feature added in r192732 2009-05-25 06:58:42 +00:00
rwatson
c6d1d7c2f1 Rename files that collide on case-insensitive file systems by encoding
colliding upper case letters as the lower case letter with a '_' in
front.

MFC after:	3 days
Discussed with:	ed
Spotted by:	Michael David Crawford <mdc at prgmr.com>
2009-03-10 09:33:22 +00:00
ed
a8d4dcbeed Allow jot(1) regression tests to be checked out on Windows filesystems.
The jot(1) regression tests directory contained two tests named `wx' and
`wX', which doesn't work on case insensitive filesystems. Rename `wX' to
`wX1'.

MFC after:	1 month
2009-01-16 15:47:35 +00:00
dds
84b8296ef7 Add a test for the "or more" part of the following POSIX specification.
"A function can be preceded by one or more '!' characters, in which
  case the function shall be applied if the addresses do not select
  the pattern space."
2008-11-11 17:10:24 +00:00
keramida
3e29761157 Attach the tr(1) regression tests to the build.
Approved by:	das, dds
2008-01-13 08:33:58 +00:00
keramida
fb6f1f0603 Add a new set of regression tests, for the tr(1) utility.
Approved by:    das, dds
2008-01-13 08:33:20 +00:00
dds
1ea3009c60 Make the reported number of tests match their actual number.
This fixes the reporting under prove(1)
2007-12-16 08:02:09 +00:00
dds
df6713d913 cd to the correct directory so that the tests can be run from prove(1) 2007-12-16 07:55:33 +00:00
delphij
44a6a1a0ec Add a test case for sed(1) regression - we should not ignore case
when not being asked to do so.

Approved by:	re (hrs)
2007-07-06 16:36:52 +00:00