Assaf Gordon
9f521104fa
tests: convert "subwrite" test to new framework
...
* testsuite/misc.pl (Tests): Add subwrite.
* testsuite/subwrite.inp: Likewise.
* testsuite/subwrite.sed: Likewise.
* testsuite/subwrt1.good: Delete file.
* testsuite/subwrt2.good: Delete file.
* testsuite/local.mk (EXTRA_DIST): Remove their names.
(SEDTESTS): Remove "subwrite".
2017-05-10 21:37:25 -04:00
Assaf Gordon
2f27d079c4
tests: convert "writeout" test to new framework
...
* testsuite/misc.pl (Tests): Add writeout.
* testsuite/writeout.inp: Likewise.
* testsuite/writeout.sed: Likewise.
* testsuite/wrtout1.good: Delete file.
* testsuite/wrtout2.good: Delete file.
* testsuite/local.mk (EXTRA_DIST): Remove their names.
(SEDTESTS): Remove "writeout".
2017-05-10 21:37:21 -04:00
Assaf Gordon
50b7d92bab
tests: convert 'quiet'/'file' tests to new framework
...
* testsuite/local.mk: (SEDTESTS): Remove tests.
* testsuite/misc.pl: Add tests.
2017-05-10 21:37:21 -04:00
Assaf Gordon
34ec11a66b
tests: convert "brackets" test to new framework
...
* testsuite/misc.pl (Tests): Add brackets.
* testsuite/brackets.good: Delete file.
* testsuite/brackets.inp: Likewise.
* testsuite/brackets.sed: Likewise.
* testsuite/local.mk (EXTRA_DIST): Remove their names.
(SEDTESTS): Remove "brackets".
2017-05-10 21:37:21 -04:00
Assaf Gordon
53edb359af
tests: convert "sep" test to new framework
...
* testsuite/misc.pl (Tests): Add sep.
* testsuite/sep.good: Delete file.
* testsuite/sep.inp: Likewise.
* testsuite/sep.sed: Likewise.
* testsuite/local.mk (EXTRA_DIST): Remove their names.
(SEDTESTS): Remove "sep".
2017-05-10 21:37:21 -04:00
Assaf Gordon
393733a314
tests: convert "readin" test to new framework
...
* testsuite/misc.pl (Tests): Add readin.
* testsuite/readin.good: Delete file.
* testsuite/readin.inp: Likewise.
* testsuite/readin.sed: Likewise.
* testsuite/local.mk (EXTRA_DIST): Remove their names.
(SEDTESTS): Remove "readin".
2017-05-10 21:37:20 -04:00
Assaf Gordon
3d720b26f1
tests: convert "numsub" test to new framework
...
* testsuite/misc.pl (Tests): Add numsub.
* testsuite/numsub.good: Delete file.
* testsuite/numsub.inp: Likewise.
* testsuite/numsub.sed: Likewise.
* testsuite/local.mk (EXTRA_DIST): Remove their names.
(SEDTESTS): Remove "numsub".
2017-05-10 21:37:20 -04:00
Assaf Gordon
e6d41f4de4
tests: convert "numsub5" test to new framework
...
* testsuite/misc.pl (Tests): Add numsub5.
* testsuite/numsub5.good: Delete file.
* testsuite/numsub5.inp: Likewise.
* testsuite/numsub5.sed: Likewise.
* testsuite/local.mk (EXTRA_DIST): Remove their names.
(SEDTESTS): Remove "numsub5".
2017-05-10 21:37:20 -04:00
Assaf Gordon
43835d4f27
tests: convert "numsub4" test to new framework
...
* testsuite/misc.pl (Tests): Add numsub4.
* testsuite/numsub4.good: Delete file.
* testsuite/numsub4.inp: Likewise.
* testsuite/numsub4.sed: Likewise.
* testsuite/local.mk (EXTRA_DIST): Remove their names.
(SEDTESTS): Remove "numsub4".
2017-05-10 21:37:20 -04:00
Assaf Gordon
901700295a
tests: convert "numsub3" test to new framework
...
* testsuite/misc.pl (Tests): Add numsub3.
* testsuite/numsub3.good: Delete file.
* testsuite/numsub3.inp: Likewise.
* testsuite/numsub3.sed: Likewise.
* testsuite/local.mk (EXTRA_DIST): Remove their names.
(SEDTESTS): Remove "numsub3".
2017-05-10 21:37:20 -04:00
Assaf Gordon
628f37dba2
tests: convert "numsub2" test to new framework
...
* testsuite/misc.pl (Tests): Add numsub2.
* testsuite/numsub2.good: Delete file.
* testsuite/numsub2.inp: Likewise.
* testsuite/numsub2.sed: Likewise.
* testsuite/local.mk (EXTRA_DIST): Remove their names.
(SEDTESTS): Remove "numsub2".
2017-05-10 21:37:20 -04:00
Assaf Gordon
042ea8ebe6
tests: convert "newline-anchor" test to new framework
...
* testsuite/misc.pl (Tests): Add newline-anchor.
* testsuite/newline-anchor.good: Delete file.
* testsuite/newline-anchor.inp: Likewise.
* testsuite/newline-anchor.sed: Likewise.
* testsuite/local.mk (EXTRA_DIST): Remove their names.
(SEDTESTS): Remove "newline-anchor".
2017-05-10 21:37:20 -04:00
Assaf Gordon
ff1d9f9e6e
tests: convert "middle" test to new framework
...
* testsuite/misc.pl (Tests): Add middle.
* testsuite/middle.good: Delete file.
* testsuite/middle.inp: Likewise.
* testsuite/middle.sed: Likewise.
* testsuite/local.mk (EXTRA_DIST): Remove their names.
(SEDTESTS): Remove "middle".
2017-05-10 21:37:20 -04:00
Assaf Gordon
e3ca6642c6
tests: convert "xabcx" test to new framework
...
* testsuite/misc.pl (Tests): Add xabcx.
* testsuite/xabcx.good: Delete file.
* testsuite/xabcx.inp: Likewise.
* testsuite/xabcx.sed: Likewise.
* testsuite/local.mk (EXTRA_DIST): Remove their names.
(SEDTESTS): Remove "xabcx".
2017-05-10 21:37:19 -04:00
Assaf Gordon
38468e9787
tests: convert "manis" test to new framework
...
* testsuite/misc.pl (Tests): Add manis.
* testsuite/manis.good: Delete file.
* testsuite/manis.inp: Likewise.
* testsuite/manis.sed: Likewise.
* testsuite/local.mk (EXTRA_DIST): Remove their names.
(SEDTESTS): Remove "manis".
2017-05-10 21:37:19 -04:00
Assaf Gordon
53fc70ba89
tests: convert "linecnt" test to new framework
...
* testsuite/misc.pl (Tests): Add linecnt.
* testsuite/linecnt.good: Delete file.
* testsuite/linecnt.inp: Likewise.
* testsuite/linecnt.sed: Likewise.
* testsuite/local.mk (EXTRA_DIST): Remove their names.
(SEDTESTS): Remove "linecnt".
2017-05-10 21:37:19 -04:00
Assaf Gordon
00dfc24358
tests: convert "khadafy" test to new framework
...
* testsuite/misc.pl (Tests): Add khadafy.
* testsuite/khadafy.good: Delete file.
* testsuite/khadafy.inp: Likewise.
* testsuite/khadafy.sed: Likewise.
* testsuite/local.mk (EXTRA_DIST): Remove their names.
(SEDTESTS): Remove "khadafy".
2017-05-10 21:37:19 -04:00
Assaf Gordon
15c5f28bd2
tests: convert "inclib" test to new framework
...
* testsuite/misc.pl (Tests): Add inclib.
* testsuite/inclib.good: Delete file.
* testsuite/inclib.inp: Likewise.
* testsuite/inclib.sed: Likewise.
* testsuite/local.mk (EXTRA_DIST): Remove their names.
(SEDTESTS): Remove "inclib".
2017-05-10 21:37:19 -04:00
Assaf Gordon
b1d6e355be
tests: convert "factor" test to new framework
...
* testsuite/misc.pl (Tests): Add factor.
* testsuite/factor.good: Delete file.
* testsuite/factor.inp: Likewise.
* testsuite/factor.sed: Likewise.
* testsuite/local.mk (EXTRA_DIST): Remove their names.
(SEDTESTS): Remove "factor".
2017-05-10 21:37:19 -04:00
Assaf Gordon
1f4568370f
tests: convert "flipcase" test to new framework
...
* testsuite/misc.pl (Tests): Add flipcase.
* testsuite/flipcase.good: Delete file.
* testsuite/flipcase.inp: Likewise.
* testsuite/flipcase.sed: Likewise.
* testsuite/local.mk (EXTRA_DIST): Remove their names.
(SEDTESTS): Remove "flipcase".
2017-05-10 21:37:19 -04:00
Assaf Gordon
0280fb2bc0
tests: convert "fasts" test to new framework
...
* testsuite/misc.pl (Tests): Add fasts.
* testsuite/fasts.good: Delete file.
* testsuite/fasts.inp: Likewise.
* testsuite/fasts.sed: Likewise.
* testsuite/local.mk (EXTRA_DIST): Remove their names.
(SEDTESTS): Remove "fasts".
2017-05-10 21:37:19 -04:00
Assaf Gordon
3942c0d210
tests: convert "enable" test to new framework
...
* testsuite/misc.pl (Tests): Add enable.
* testsuite/enable.good: Delete file.
* testsuite/enable.inp: Likewise.
* testsuite/enable.sed: Likewise.
* testsuite/local.mk (EXTRA_DIST): Remove their names.
(SEDTESTS): Remove "enable".
2017-05-10 21:37:19 -04:00
Assaf Gordon
6e4a0c1c4c
tests: convert "cv-vars" test to new framework
...
* testsuite/misc.pl (Tests): Add cv-vars.
* testsuite/cv-vars.good: Delete file.
* testsuite/cv-vars.inp: Likewise.
* testsuite/cv-vars.sed: Likewise.
* testsuite/local.mk (EXTRA_DIST): Remove their names.
(SEDTESTS): Remove "cv-vars".
2017-05-10 21:37:18 -04:00
Assaf Gordon
62abe24933
tests: convert "classes" test to new framework
...
* testsuite/misc.pl (Tests): Add classes.
* testsuite/classes.good: Delete file.
* testsuite/classes.inp: Likewise.
* testsuite/classes.sed: Likewise.
* testsuite/local.mk (EXTRA_DIST): Remove their names.
(SEDTESTS): Remove "classes".
2017-05-10 21:37:18 -04:00
Assaf Gordon
b4a5e6e968
tests: convert "bkslashes" test to new framework
...
* testsuite/misc.pl (Tests): Add bkslashes.
* testsuite/bkslashes.good: Delete file.
* testsuite/bkslashes.inp: Likewise.
* testsuite/bkslashes.sed: Likewise.
* testsuite/local.mk (EXTRA_DIST): Remove their names.
(SEDTESTS): Remove "bkslashes".
2017-05-10 21:37:18 -04:00
Assaf Gordon
a5be8cb23c
tests: convert "amp-escape" test to new framework
...
* testsuite/misc.pl (Tests): Add amp-escape.
* testsuite/amp-escape.good: Delete file.
* testsuite/amp-escape.inp: Likewise.
* testsuite/amp-escape.sed: Likewise.
* testsuite/local.mk (EXTRA_DIST): Remove their names.
(SEDTESTS): Remove "amp-escape".
2017-05-10 21:37:18 -04:00
Assaf Gordon
9c19138f89
tests: convert "appquit" test to new framework
...
* testsuite/misc.pl (Tests): Add appquit.
* testsuite/appquit.good: Delete file.
* testsuite/appquit.inp: Likewise.
* testsuite/appquit.sed: Likewise.
* testsuite/local.mk (EXTRA_DIST): Remove their names.
(SEDTESTS): Remove "appquit".
2017-05-10 21:37:18 -04:00
Assaf Gordon
e925d8a5bd
tests: convert "0range" test to new framework
...
* testsuite/misc.pl (Tests): Add 0range.
* testsuite/0range.good: Delete file.
* testsuite/0range.inp: Likewise.
* testsuite/0range.sed: Likewise.
* testsuite/local.mk (EXTRA_DIST): Remove their names.
(SEDTESTS): Remove "0range".
2017-05-10 21:37:18 -04:00
Assaf Gordon
670914a384
tests: convert "dollar" test to new framework
...
* testsuite/misc.pl (Tests): Add dollar.
* testsuite/dollar.good: Delete file.
* testsuite/dollar.inp: Likewise.
* testsuite/dollar.sed: Likewise.
* testsuite/local.mk (EXTRA_DIST): Remove their names.
(SEDTESTS): Remove "dollar".
2017-05-10 21:37:14 -04:00
Assaf Gordon
553f9b12fa
tests: convert "xbxcx3" test to new framework
...
* testsuite/misc.pl (Tests): Add xbxcx3.
* testsuite/xbxcx3.good: Delete file.
* testsuite/xbxcx3.inp: Likewise.
* testsuite/xbxcx3.sed: Likewise.
* testsuite/local.mk (EXTRA_DIST): Remove their names.
(SEDTESTS): Remove "xbxcx3".
2017-05-10 21:34:09 -04:00
Assaf Gordon
e0669264cd
tests: convert "xabcx" test to new framework
...
* testsuite/misc.pl (Tests): Add xabcx.
* testsuite/xabcx.good: Delete file.
* testsuite/xabcx.inp: Likewise.
* testsuite/xabcx.sed: Likewise.
* testsuite/local.mk (EXTRA_DIST): Remove their names.
(SEDTESTS): Remove "xabcx".
2017-05-10 21:34:03 -04:00
Assaf Gordon
c0a5c50492
tests: convert "xbxcx" test to new framework
...
* testsuite/misc.pl (Tests): Add xbxcx.
* testsuite/xbxcx.good: Delete file.
* testsuite/xbxcx.inp: Likewise.
* testsuite/xbxcx.sed: Likewise.
* testsuite/local.mk (EXTRA_DIST): Remove their names.
(SEDTESTS): Remove "xbxcx".
2017-05-10 21:33:57 -04:00
Jim Meyering
9785b2ae6b
tests: convert "recall2" test to new framework
...
* testsuite/misc.pl (Tests): Add recall2.
* testsuite/recall2.good: Delete file.
* testsuite/recall2.inp: Likewise.
* testsuite/recall2.sed: Likewise.
* testsuite/local.mk (EXTRA_DIST): Remove their names.
(SEDTESTS): Remove "recall2".
2017-05-10 02:02:28 +00:00
Jim Meyering
f64aa7873b
tests: convert "recall" test to new framework
...
* testsuite/misc.pl (Tests): Add recall.
* testsuite/recall.good: Delete file.
* testsuite/recall.inp: Likewise.
* testsuite/recall.sed: Likewise.
* testsuite/local.mk (EXTRA_DIST): Remove their names.
(SEDTESTS): Remove "recall".
2017-05-10 02:02:28 +00:00
Jim Meyering
409ec0b60c
tests: convert "insert" test to new framework
...
* testsuite/misc.pl (Tests): Add insert-nl.
* testsuite/insert.good: Delete file.
* testsuite/insert.inp: Likewise.
* testsuite/insert.sed: Likewise.
* testsuite/local.mk (EXTRA_DIST): Remove their names.
(SEDTESTS): Remove "insert".
2017-05-10 02:02:28 +00:00
Jim Meyering
5bd3258819
tests: convert "allsub" test to new framework
...
* testsuite/misc.pl (Tests): Add allsub.
* testsuite/allsub.good: Delete file.
* testsuite/allsub.inp: Likewise.
* testsuite/allsub.sed: Likewise.
* testsuite/local.mk (EXTRA_DIST): Remove their names.
(SEDTESTS): Remove "allsub".
2017-05-10 02:02:28 +00:00
Jim Meyering
5cd810a5d3
tests: convert "y-newline" test to new framework
...
* testsuite/misc.pl (Tests): Add y-newline.
* testsuite/y-newline.good: Delete file.
* testsuite/y-newline.inp: Likewise.
* testsuite/y-newline.sed: Likewise.
* testsuite/local.mk (EXTRA_DIST): Remove their names.
(SEDTESTS): Remove "y-newline".
2017-05-10 02:02:28 +00:00
Jim Meyering
67ac778599
tests: convert "y-zero" test to new framework
...
* testsuite/misc.pl (Tests): Add y-zero.
* testsuite/y-zero.good: Delete file.
* testsuite/y-zero.inp: Likewise.
* testsuite/y-zero.sed: Likewise.
* testsuite/local.mk (EXTRA_DIST): Remove their names.
(SEDTESTS): Remove "y-zero".
2017-05-10 02:02:28 +00:00
Jim Meyering
41da447bbc
tests: convert "y-bracket" test to new framework
...
* testsuite/misc.pl (Tests): Add y-bracket.
* testsuite/y-bracket.good: Delete file.
* testsuite/y-bracket.inp: Likewise.
* testsuite/y-bracket.sed: Likewise.
* testsuite/local.mk (EXTRA_DIST): Remove their names.
(SEDTESTS): Remove "y-bracket".
2017-05-10 02:02:28 +00:00
Jim Meyering
a53744ee0d
tests: convert "noeol" to new framework
...
* testsuite/misc.pl (preserve-missing-EOL-at-EOF): New test,
replacing...
* testsuite/noeol.good: Delete file.
* testsuite/noeol.inp: Likewise.
* testsuite/noeol.sed: Likewise.
* testsuite/local.mk (EXTRA_DIST): Remove their names.
(SEDTESTS): Remove "noeol".
* testsuite/Makefile.tests (noeol): Remove target.
We also require this additional change, since the noeolw test
used the just-deleted noeol.inp input file:
* testsuite/noeolw.inp: New file, renamed from testsuite/noeol.inp.
* testsuite/Makefile.tests: Use noeolw.inp, not the other test's file.
(EXTRA_DIST): Add testsuite/noeolw.inp.
2017-05-10 02:02:28 +00:00
Jim Meyering
5f4c6d2ae4
tests: convert "insens" to new framework
...
* testsuite/misc.pl (case-insensitive): New test, replacing...
* testsuite/insens.good: Delete file.
* testsuite/insens.inp: Likewise.
* testsuite/insens.sed: Likewise.
* testsuite/local.mk (EXTRA_DIST): Remove their names.
(SEDTESTS): Remove "insens".
2017-05-10 02:02:28 +00:00
Jim Meyering
0eaa3cf946
tests: begin migrating test triples into perl framework
...
* testsuite/head.good: Delete file.
* testsuite/head.inp: Likewise.
* testsuite/head.sed: Likewise.
* testsuite/space.good: Likewise
* testsuite/space.inp: Likewise.
* testsuite/space.sed: Likewise.
* testsuite/empty.good: Likewise
* testsuite/empty.inp: Likewise.
* testsuite/empty.sed: Likewise.
* testsuite/zero-anchor.good: Likewise
* testsuite/zero-anchor.inp: Likewise.
* testsuite/zero-anchor.sed: Likewise.
* testsuite/misc.pl: New file, subsuming the above, with one test
for each of the test file triples (input, output, sed commands).
(empty, empty2, head, space, zero-anchor): Converted tests.
* testsuite/local.mk: Remove references to deleted files.
(T): Add misc.pl.
2017-05-10 02:02:28 +00:00
Assaf Gordon
27815344e5
tests: keep temporary directory if SAVE_TEMPS requested
...
When developers run 'make check SAVE_TEMPS=yes' the 'Coreutils.pm'
module does not delete the temporary files, but the CuTmpdir.pm still
deletes the temp directory. With this change, the temp directory is
kept, and printed to the log file (e.g. test-suite.log).
* testsuite/CuTmpdir.pm: if $EMV{SAVE_TEMPS} is not empty, don't
auto-delete the temp directory, and print it to the log.
2017-05-10 02:02:28 +00:00
Assaf Gordon
74dc7dca4d
maint: fix wrong PATH in testsuite
...
The switch to non-recursive make in v4.2.2-129-g3b29bec used a wrong
directory name in the PATH construction of automake's TESTS_ENVIRONMENT
variable ('/src/' instead of '/sed').
This had no effect as each test shell script appended the ./sed/ path
independently. However, switching to perl-based tests - this will be
noticed as the just-built sed binary will not be in the PATH.
* testsuite/local.mk: Fix $PATH variable in test environment.
2017-05-10 02:02:28 +00:00
Jim Meyering
0141cf8288
maint: ignore more
...
* .gitignore: Ignore a bunch of doc/*.* texinfo artifacts and sort.
2017-04-22 13:23:03 -04:00
Jim Meyering
031fa38f4e
tests: support perl-based tests like those of grep and coreutils
...
* configure.ac: Define HAVE_PERL.
* testsuite/Coreutils.pm: New file. From grep.
* testsuite/CuSkip.pm: Likewise.
* testsuite/CuTmpdir.pm: Likewise.
* testsuite/local.mk (, TEST_EXTENSIONS): Add .pl.
(TESTSUITE_PERL, TESTSUITE_PERL_OPTIONS): Define.
(PL_LOG_COMPILER): Define.
(EXTRA_DIST): Add the new .pm files.
2017-04-22 13:23:03 -04:00
Assaf Gordon
11a2a701ec
sed: enable special meaning of '+' with '-E --posix'
...
in sed-4.2 and later, '--posix' option wrongly disabled the special meaning
of '+' even in ERE mode (--posix should only disable it in BRE mode,
since it is a GNU extension in BRE). Bug introduced in the original
implementation of --posix in v4.1a-5-gba68fb4.
Reported by Jordan Torbiak in https://bugs.gnu.org/26409 .
* NEWS: Mention bug fix.
* sed/regexp.c (compile_regex_1): In --posix mode, set RE_LIMITED_OPS
only in BRE mode.
* testsuite/posix-mode-ERE.sh: New test.
* testsuite/local.mk: Add new test.
2017-04-18 20:47:41 -04:00
Assaf Gordon
156e6be99f
tests: test comments, braces after commands
...
Test multiple combinations of comments, spaces, braces after commands,
to validate recently added function 'read_end_of_cmd()'.
See discussion in https://bugs.gnu.org/22460 .
* testsuite/command-endings.sh: New test, including y/// bug.
* testsuite/local.mk: Add new test.
2017-03-21 22:33:39 -04:00
Assaf Gordon
9b26a0651a
sed: refactor end-of-line parsing
...
Follow-up to bug#22460: extract repeated code to parse end of lines
(while saving comments, braces) into a new function.
See discussion in https://bugs.gnu.org/22460 .
* sec/compile.c (read_end_of_cmd): New function, consumes sed script
input until newline, EOF, semicolon, closing brace or comment is found.
(compile_program): Call new function instead of duplicating code.
2017-03-21 22:30:17 -04:00
Thorsten Heymann
cf8eb6cb39
sed: allow comments, braces after y///
...
sed-4.4 and earlier rejected the following:
$ sed 'y/1/a/ #f'
sed: -e expression #1 , char 8: extra characters after command
See https://bugs.gnu.org/22460 .
* sed/compile.c (compile_program): Handle comments, braces after 'y' command.
* NEWS: Mention it.
2017-03-21 22:14:29 -04:00