summaryrefslogtreecommitdiffstats
path: root/tools/regression/usr.bin/sed
Commit message (Collapse)AuthorAgeFilesLines
* MFC various moves of tools/regressions/ tests to the new infrastructure.jmmv2014-04-27158-5572/+0
| | | | | | | | | | | | | | | | - r263220 Migrate tools/regression/sbin/ to the new tests layout. - r263222 Add Makefile missed in r263220. - r263226 Migrate tools/regression/{usr.bin/lastcomm,usr.sbin}/ to the new tests layout. - r263227 Migrate most of tools/regression/usr.bin/ to the new tests layout. - r263345 Expand tabs that sneaked in into spaces. - r263346 Migrate tools/regression/usr.bin/make/ to the new tests layout. - r263348 Add Makefiles missed in r263346. - r263351 Migrate tools/regression/usr.bin/pkill/ to the new tests layout. - r263388 Mark multi_test as requiring /usr/share/dict/words. - r263814 Fix path to the run.pl script to let these tests run. - r264742 Prevent building tests when bootstrapping make. This is 'make tinderbox' clean.
* MFC various fixes to the tools/regression/ tests.jmmv2014-04-141-1/+1
| | | | | | | | | | | | | | | | | | | - r262953 Fix m4 tests so that they run cleanly with prove. - r262954 Fix printf tests so that they run cleanly with prove. - r262959 Fix sed tests so that they run cleanly with prove. - r262960 Fix yacc tests so that they run cleanly with prove. - r262961 Fix pkill tests so that they run cleanly with prove. - r262962 Fix ncal tests so that they run cleanly with prove. - r263081 Fix lastcomm tests under amd64. - r263082 Only run the make tests when make is fmake. - r263083 Fix sa tests. - r263084 Turn a test precondition into a skip in the mdconfig tests. - r263085 Make the strerror tests work without libtap. - r263087 Remove broken tests for eui64_line. - r263221 Change etcupdate tests to return 1 on test failures. - r263352 Make the priv test program exit with non-zero if any failures are detected. - r263353 errx prepends the program name to the message; don't do it by hand. - r263362 Include strings.h so that bpf_filter.c can be built in userland.
* MFC r259132,r259133,r259143:eadler2013-12-162-0/+5
| | | | | | | | | | | | Per the resolution of POSIX bug 0000779 (note 0002050) add support for using 'i' as a case insensitive flag. Add regression test for recently added 'i' flag in r259132. the i modifier was added in r259132 since POSIX recently agreed to add it. Switch uses of /I to /i. PR: standards/184641
* Spelling fixes for tools/uqs2011-12-301-1/+1
| | | | Add some $FreeBSD$ tags so svn will allow the commit.
* sed: Add test for r217133 (-i race).jilles2011-01-082-0/+84
| | | | | PR: bin/153261 MFC after: 2 weeks
* There are actually 129 tests here.obrien2010-01-041-1/+1
|
* IEEE Std 1003.1, 2004 Edition states:dds2009-09-203-0/+6
| | | | | | | | | | | | | "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
* Follow POSIX (IEEE Std 1003.1, 2004 Edition) in the implementationdds2009-09-202-0/+5
| | | | | | | | | | | 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
* Add correct test results.dds2009-09-203-0/+42
|
* Describe how other systems treat this case.dds2009-09-201-1/+5
|
* Allow [ to be used as a delimiter.dds2009-09-201-0/+9
| | | | | Pointed by: Marius Strobl Obtained from: Apple
* The transition to Subversion allows us to rename files withoutdds2009-09-20124-9/+7
| | | | | | repo-copy hacks. Remove the test-number prefix from the name of the output files, so that new test cases can be easily added.
* Regression test the 'addr1,+N' feature added in r192732brian2009-05-253-0/+10
|
* Add a test for the "or more" part of the following POSIX specification.dds2008-11-112-1/+3
| | | | | | "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."
* Make the reported number of tests match their actual number.dds2007-12-161-1/+1
| | | | This fixes the reporting under prove(1)
* cd to the correct directory so that the tests can be run from prove(1)dds2007-12-161-0/+1
|
* Add a test case for sed(1) regression - we should not ignore casedelphij2007-07-062-0/+5
| | | | | | when not being asked to do so. Approved by: re (hrs)
* Add case-insensitive matching to sed, using the 'I' flag, similarly to GNU sed.ssouhlal2007-07-043-0/+10
| | | | | | | | | For example, sed /foo/Id sed s/foo/bar/Ig Reviewed by: dds Approved by: re (hrs)
* Don't forget to clear out the hold space for each subsequent fileyar2007-06-121-1/+2
| | | | | | | | when in -i mode so that each file gets a clean context of its own. Add a regression test for the bug. Tested with: regression tests
* Change the semantics of -i (in-place editing) so that it treatsyar2007-04-211-1/+35
| | | | | | | | | | | | | | | | | each file independently from other files. The new semantics are desired in the most of practical cases, e.g.: delete lines 5-9 from each file. Keep the previous semantics of -i under a new option, -I, which uses a single continuous address space covering all files to edit in-place -- they are too cool to just drop them. Add regression tests for -i and -I. Approved by: dds Compared with: GNU sed Discussed on: -hackers MFC after: 2 weeks
* Logically separate the complex `hanoi' and `math' tests from basic tests.yar2007-04-021-2/+3
|
* Don't forget to close the range if we branched over its endyar2007-04-022-1/+6
| | | | | | | | | | | | | and had no chance to match it by the 2nd address precisely. Otherwise the unclosed range would bogusly extend to the end of stream. Add a basic regression test for the bug fixed. (This change also fixes the more complex case 5.3 from `multitest.t'.) Compared with: SUN and GNU seds Tested by: regression tests MFC after: 1 week
* Today SUN and GNU seds fully agree on test 5.3 and behaveyar2007-04-022-13/+1
| | | | | | in a more reasonable way than BSD sed does: they properly close the range even if we branched over its end. No doubt, the range `1,5' should not match lines from 9 through 14.
* This trivial change should fix at least 3 similar bugs. All ofyar2007-04-015-1/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | them are related to the `c' function's need to know if we are at the actual end of the address range. (It must print the text not earlier than the whole pattern space was deleted.) It appears the only sed function with this requirement. There is `lastaddr' set by applies(), which is to notify the `c' function, but it can't always help because it's false when we are hitting the end of file early. There is also a bug in applies() due to which `lastaddr' isn't set to true on degenerate ranges such as `$,$' or `N,$' if N appears the last line number. Handling early EOF condition in applies() could look more logical, but it would effectively revert sed to the unreasonable behaviour rev. 1.26 of main.c fought against, as it would require lastline() be called for each line within each address range. So it's better to call lastline() only if needed by the `c' function. Together with this change to sed go regression tests for the bugs fixed (c1-c3). A basic test of `c' (c0) is also added as it helped me to spot my own error. Discussed with: dds Tested by: the regression tests MFC after: 1 week
* Rename sed.test to multitest.t to comply with the naming scheme ofdds2007-03-142-473/+1
| | | | the regression suite.
* Reinstate error-testing regression tests.dds2007-03-1433-78/+107
|
* Integrate the tests I wrote in 1992 with our current regressiondds2007-03-143-130/+111
| | | | testing framework and protocol.
* Reference results for sed.test (to be renamed into multitest.t).dds2007-03-1490-0/+4210
| | | | | | | | | I have verified these with GNU sed 4.1.5 (and in some cases with Solaris sed) and they are identical, with the following exceptions: 5.3: The result is unspecified and BSD sed behaves differently. 6.3: GNU sed gets it wrong 7.1: GNU sed gets it wrong 7.8: BSD sed gets it wrong
* - Uncomment tests that were commented outdds2007-03-142-172/+84
| | | | | - Update platform-conditional tests to reflect current reality - Fix conditional for test 7.8: it is the fault of BSD sed
* - It looks like BSD and GNU sed can nowadays pass two more tests.dds2007-03-142-14/+8
| | | | - Test 7.8 fails for GNU sed not BSD.
* Use another non-printing test; address 0 now has a special meaning in GNU sed.dds2007-03-142-4/+4
|
* Update tests to reflect the state of the art of sed in HEAD anddds2007-03-142-90/+38
| | | | | | GNU sed 4.1.5. Almost all of the tests that were skipped for BSD or GNU sed now appear to work.
* Add sed math regression test.dds2007-03-142-1/+3
|
* Add Towers of Hanoi regression test.dds2007-03-142-1/+19
|
* Add missing newline to correct failure of the regression test.dds2007-03-141-1/+1
| | | | | | | | | According to IEEE Std 1003.1, 2004 "Whenever the pattern space is written to standard output or a named file, sed shall immediately follow it with a <newline>." An attempt at the same correction might have been made with r1.3, which is however identical with r1.2.
* Switch over to a different, more flexible test output protocol that'snik2004-11-112-0/+8
| | | | | | | | | | | | | | | | | | | | 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.
* Per letter dated July 22, 1999 remove 3rd clause of Berkeley deriveddds2004-08-092-8/+0
| | | | | | software (original contributor). Reviewed by: imp
* A new version that does exponents and lots of other neat things. Updatesmkelly2004-05-011-59/+335
| | | | | | from the original author of math.sed. Submitted by: K S Braunsdorf <sed@ksb.npcguild.org>
* Test 8.16 in sed.test tests the ability of a sed to handle an emptydds2003-07-222-22/+38
| | | | | | | | | | | | | | | | | 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
* Add tests for the behaviour of substitution when the regex can matchfanf2003-06-045-0/+8
| | | | a zero-length string. This shows bugs in the s///g and s///2+ cases.
* Update another mention of <CR><CR> I missed the first time around (rev 1.2)tjr2002-07-041-1/+1
|
* Note that two carriage returns aren't required after entering thetjr2002-07-031-2/+3
| | | | | | initial setup anymore (since process.c rev. 1.25). Add $FreeBSD$. MFC after: 2 weeks
* The wrong y/// output got spammed into this file; from green@ indirectly.jmallett2002-06-271-1/+1
|
* Correct the psl regression test for sed(1)'s now-fixed newlinegreen2002-06-273-0/+8
| | | | | | | | | | 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>
* Erk, I forgot that regress.in has an ending newline, so change the test forjmallett2002-06-262-5/+2
| | | | transliterate to use echo -n to supress newline and a simple string.
* Add a regression test for transliterate which happens to match charactersjmallett2002-06-252-0/+5
| | | | | | | at an EOL/EOF, and therefore should catch the broken behaviour fixed by Tim J. Robbins in sed(1) recently. Suggested by: obrien
* Convert straightforward regression tests to use regress.m4.jmallett2002-06-242-30/+6
| | | | Goodbye, duplicated code, you will certainly not be missed.
* Prefix tests with PASS and FAIL, to make grepping easier, and note this injmallett2002-04-271-2/+2
| | | | | | the README. This affects only the base-system regression tests, of course.
* For the P function, the newline must be considered a part of the patternjmallett2002-04-212-1/+12
| | | | | space, so when printing it, don't let the pattern space and the output run into eachother by omitting the \n when printing.
* Add sed(1) tests for proper behaviour of the G option as fixed in PR 26152,jmallett2002-04-215-0/+47
| | | | | | | | | | 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.
OpenPOWER on IntegriCloud