Commit Graph
538 Commits
Author SHA1 Message Date
Assaf Gordon cb6cb45fed doc: change URLs to https
* doc/config.texi, doc/sed-dummy.1, doc/sed.texi: Change http to https for
GNU URLs. External links (e.g. sed.sf.net, autsingroup.org) currently do
not support https and kept as-is.
2018-02-13 16:07:29 -07:00
Assaf Gordon a2daab7fb1 maint: change http to https in license headers
* all files: Change http to https for all licenses URL.
2018-02-13 16:02:12 -07:00
Assaf Gordon a328263a41 sed: use https in usage screen contact information
* sed/sed.c (contact): Change http to https.
2018-02-13 15:51:55 -07:00
Jim Meyering 7747982294 build: update gnulib to latest
* gnulib: This fixes a syntax-check failure that was due to the
new use of "/proc/filesystems" in init.cfg.
2018-02-04 02:36:36 -08:00
Jim Meyering 85d8340acd maint: make cfg.mk slightly more generic
* cfg.mk (announcement_Cc_): Don't hard-code "sed-devel@".
Use "$(PACKAGE)-devel@" instead.
2018-01-31 22:11:27 +13:00
Jakub Martisko 057ab92dfe sed: with --in-place and selinux, use the symlink's context
When editing a file in place, the SELinux context (if exists)
should be based on the link instead of the target file itself.
--follow-symlinks option remains unchanged.

Bug reported by Jakub Jelen, fix proposed by Petr Lautrbach,
discussed in https://lists.gnu.org/r/sed-devel/2017-12/msg00000.html

* NEWS: Mention this.
* sed/execute.c (open_next_file): Use lgetfilecon (instead of getfilecon)
to get the context of the symlink instead of the target file.
* testsuite/inplace-selinux.sh: Test the above change.
* testsuite/local.mk (T): Add new test file.
* init.cfg (require_selinux_): Copied from coreutils, skip the test if
selinux is not available.
2018-01-09 15:44:51 -07:00
Assaf Gordon 4d4c0d5ad0 maint: update gnulib and copyright dates for 2018
* gnulib: Update to latest.
* all files: Run "make update-copyright".
2018-01-02 13:56:16 -07:00
Jim Meyering 80ebb116b7 maint: update to work with GCC7's -Werror=implicit-fallthrough=
* sed/sed.h (FALLTHROUGH): Define.
* sed/execute.c (execute_program): Use new FALLTHROUGH macro in place
of each comment.
* sed/compile.c (mark_subst_opts, compile_program): Likewise.
2017-11-22 19:22:54 -08:00
Assaf Gordon 490b4997fe doc: fix incorrect line-wrapping example
Reported by Bamber Ward in https://bugs.gnu.org/28140 .

* doc/sed.texi (Line length adjustment): Fix sed script;
  Rewrite example to long script with inlined comments;
  Remove second example.
2017-10-28 21:24:42 -06:00
Assaf Gordon 9f99a4f51e doc: fix missing slash in example
Reported by Nick Chambers in https://bugs.gnu.org/28881 .

* doc/sed.texi (Invoking sed::overview): Add missing slash in
's/hello/world/' command.
2017-10-17 16:48:49 -06:00
Assaf Gordon 315c804175 tests: skip utf8-ru test if required locale is not found
Reported by Dennis Clarke in https://bugs.gnu.org/28665#14 .

* init.cfg (require_ru_utf8_locale_): New function.
* testsuite/utf8-ru.sh: Skip test is required locale was not found.
2017-10-05 23:38:30 -06:00
Assaf Gordon 96e56370a4 build: require texinfo v6.1 for development builds
For development builds (using ./bootstrap), require texinfo version 6.1
or later (Same as GNU coreutils).
Sed's manual uses texinfo's @U{} command, introduced in texinfo-6.0.
This should not affect building from released tarballs, as the info
manual is pre-built and pre-packaged in the tar archive.
Reported by Dennis Clarke in https://bugs.gnu.org/28665#14 .

* bootstrap.conf: Require makeinfo 6.1 (up from 4.13).
2017-10-05 23:38:16 -06:00
Assaf Gordon 97478b089c tests: remove non-functional regex C tests
These C-based tests were not updated since 2004, and were not included
by default. Enabling them with "./configure --enable-regex-tests"
resulted in false positives:
https://bugs.gnu.org/28665 , https://bugs.gnu.org/25381 .

This patch removes them completely.

* configure.ac: Remove "--with-regex-tests" option.
* local.mk (check_PROGRAMS): Remove tests.
* bug-regex10.c,
  bug-regex11.c,
  bug-regex12.c,
  bug-regex13.c,
  bug-regex14.c,
  bug-regex15.c,
  bug-regex16.c,
  bug-regex21.c,
  bug-regex27.c,
  bug-regex28.c,
  bug-regex7.c,
  bug-regex8.c,
  bug-regex9.c,
  runptests.c,
  runtests.c,
  tst-boost.c,
  tst-pcre.c,
  tst-regex.c,
  tst-regex2.c,
  tst-rxspencer.c: Remove files.
2017-10-05 23:07:19 -06:00
Jim Meyering a59fb8826a maint: stop using @acronym{...} in texinfo sources
* doc/sed.texi, doc/config.texi: Remove all uses of @acronym{...},
per recommendation by Karl Berry.
* cfg.mk (local-checks-to-skip): Remove exemption, enabling
the @acronym{-prohibiting syntax-check rule.
2017-05-13 18:42:21 -07:00
Jim Meyering bebaa6945d gnulib: update to latest 2017-05-13 18:36:43 -07:00
Assaf Gordon 115829fc1f tests: fix various misspellings
Reported by Jim Meyering in
https://lists.gnu.org/archive/html/sed-devel/2017-05/msg00001.html .

* testsuite/BOOST.tests,
  testsuite/posix-mode-bad-ref.sh,
  testsuite/runptests.c,
  testsuite/runtests.c,
  testsuite/tst-pcre.c: Fix misspellings.
2017-05-10 21:39:57 -04:00
Assaf Gordon b8377e4303 tests: remove the 'Makefile.tests' used for old-style tests
* testsuite/Makefile.tests: Removed.
* testsuite/runtest: Remove code to run old-style tests.
* testsuite/local.mk (EXTRA_DIST): Remove MAkefile.tests.
2017-05-10 21:39:57 -04:00
Assaf Gordon b85182196a tests: convert "noeolw" test to new framework
* testsuite/misc.pl (Tests): Add noeolw.
* testsuite/noeolw.good: Delete file.
* testsuite/noeolw.1good: Likewise.
* testsuite/noeolw.2good: Likewise
* testsuite/noeolw.inp: Likewise.
* testsuite/noeolw.sed: Likewise.
* testsuite/local.mk (EXTRA_DIST): Remove their names.
(SEDTESTS): Remove "noeolw".
2017-05-10 21:39:57 -04:00
Assaf Gordon 0ea46106d3 tests: convert "mac-mf" test to new framework
All input files (mac-mf.{inp,good,sed}) are large and are kept as-is.

* testsuite/mac-mf.sh: New test.
* testsuite/local.mk (SEDTEST): Remove mac-mf. (T): Add mac-mf.sh
2017-05-10 21:39:57 -04:00
Assaf Gordon 63931dcff4 tests: convert "newjis" test to new framework
* testsuite/newjis.sh: New test.
* testsuite/newjis.{good,inp,sed}: Removed.
* testsuite/local.mk (EXTRA_DIST): Remove unneeded files.
(SEDTEST): Remove newjis. (T): Add newjis.sh
2017-05-10 21:39:57 -04:00
Assaf Gordon e86c034722 tests: convert "8to7" test to new framework
* testsuite/8to7.sh: New test.
* testsuite/8to7.{good,inp,sed}: Removed.
* testsuite/local.mk (EXTRA_DIST): Remove unneeded files.
(SEDTEST): Remove 8to7. (T): Add 8to7.sh
2017-05-10 21:39:57 -04:00
Assaf Gordon e51a067bc7 tests: convert "madding" test to new framework
All input files (madding.{inp,good,sed}) contain very long lines and
are kept as-is (to avoid failing 'make syntax-check').

* testsuite/madding.sh: New test.
* testsuite/local.mk (SEDTEST): Remove madding. (T): Add madding.sh
2017-05-10 21:39:56 -04:00
Assaf Gordon 22d1b59157 tests: convert "badenc" test to new framework
* testsuite/badenc.sh: New test.
* testsuite/distrib.{good,inp,sed}: Removed.
* testsuite/local.mk (EXTRA_DIST): Remove unneeded files.
(SEDTEST) Remove badenc. (T): Add badenc.sh
2017-05-10 21:39:56 -04:00
Assaf Gordon b1386154c8 tests: convert "distrib" test to new framework
The input file 'distrib.inp' has lines wider than 80 characters,
and is kept as a separate file.
The existing file 'distrib.sh' (which contained the same sed program as
in 'distrib.sed') was never used, and is completely rewritten.

* testsuite/distrib.sh: Rewritten as a new test.
* testsuite/distrib.{good,sed}: Removed.
* testsuite/local.mk (EXTRA_DIST): Remove unneeded files.
(SEDTEST) Remove distrib. (T): Add distrib.sh
2017-05-10 21:39:56 -04:00
Assaf Gordon 42f476e5e7 tests: convert "inplace-hold" test to new framework
* testsuite/inplace-hold.sh: New test.
* testsuite/local.mk (SEDTEST) Remove inplace-hold.
(T): Add inplace-hold.sh.
2017-05-10 21:39:56 -04:00
Assaf Gordon 141eb9a94d tests: convert "stdin" test to new framework
* testsuite/stdin.sh: New test.
* testsuite/local.mk (SEDTEST) Remove stdin.
(T): Add stdin.sh.
2017-05-10 21:39:56 -04:00
Assaf Gordon bcf425b0f1 tests: convert "eval" test to new framework
* testsuite/eval.sh: New test.
* testsuite/eval.{sed,inp,good}: Removed.
* testsuite/local.mk (EXTRA_DIST): Remove unneeded files.
(SEDTEST) Remove eval.sed.
(T): Add eval.sh.
2017-05-10 21:39:56 -04:00
Assaf Gordon aaf20d11fb tests: convert 'bsd' test to new framework
The 'bsd.sh' is a long shell script (imported from NetBSD) which runs
multiple tests, then compares the output to 'bsd.good'.
The 'bsd.sh' is not modified. Instead, a new script 'bsd-wrapper.sh'
is created to work with the newer init.sh-style testing framework.

* testsuite/bsd-wrapper.sh: New test.
* testsuite/local.mk (SEDTESTS): Remove old test. (T): Add new test.
2017-05-10 21:39:56 -04:00
Assaf Gordon 33c4242491 tests: convert 'xemacs' test to new framework
Keep input/expected output files (xemacs.inp/xemacs.good) as they contain
lines longar than 80 characters (which will fail 'make syntax-check').

* testsuite/xemacs.sed: Remove.
* testsuite/xemacs.sh: New test.
* testsuite/local.mk (EXTRA_DIST): Remove xemacs.sed.
(SEDTESTS): Remove old xemacs test.
(T): Add new xemacs.sh test.
2017-05-10 21:39:38 -04:00
Assaf Gordon 27d42598ed tests: convert 'help' test to new framework
The 'help' test was implemented directly in 'Makefile.tests' - no
external files to remove/adapt.

* testsuite/help.sh: New tests.
* testsuite/local.mk (SEDTESTS): Remove old test.
(T): Add new test.
2017-05-10 21:37:29 -04:00
Assaf Gordon 34ad433587 tests: convert 'uniq' test to new framework
Add a simple init.sh-stype wrapper to run the 'uniq' tests.
'uniq.sed' is a valid stand-alone script - keep it as-is.
The input/expected output files (uniq.inp/uniq.good) are large - keep
them as well instead of embedding them  in the shell script.

* testsuite/uniq.sh: New test.
* testsuite/local.mk (SEDTESTS): Remove uniq.sed
(T): Add uniq.sh.
2017-05-10 21:37:28 -04:00
Assaf Gordon dbe7aa548e tests: convert 'utf8-*' tests to new framework
Merge utf8-{1,2,3,4} into utf8-ru.sh script.

* testsuite/utf8-ru.sh: New test.
* testsuite/utf8-1.inp,
  testsuite/utf8-1.good,
  testsuite/utf8-1.sed,
  testsuite/utf8-2.inp,
  testsuite/utf8-2.good,
  testsuite/utf8-2.sed,
  testsuite/utf8-3.inp,
  testsuite/utf8-3.good,
  testsuite/utf8-3.sed,
  testsuite/utf8-4.inp,
  testsuite/utf8-4.good,
  testsuite/utf8-4.sed: Removed files.
* testsuite/local.mk (EXTRA_DIST): Remove deleted inp/sed/good files.
(SEDTESTS): Remove utf8-{1,2,3,4} tests.
(T): Add new test.
2017-05-10 21:37:28 -04:00
Assaf Gordon c24b91e768 tests: convert "dc" test to new framework
The 'dc.sed' program (implementing dc calculator in sed) is kept as-is.
The input (dc.inp) and expected output (dc.good) are merged into the
new shell script.
The old-style test executed two calculations at once (Easter 2002 and
square root of 2). They are now separated into two invocations of
'dc.sed'.

* testsuite/dc.sh: New test.
* testsuite/dc.inp, testuite/dc.good: Removed.
* testsuite/local.mk (EXTRA_DIST): Remove inp/good files.
(SEDTEST): Remove dc.sed.
(T): Add dc.sh.
2017-05-10 21:37:28 -04:00
Assaf Gordon a968ba77e7 tests: convert "binary/2/3" tests to new framework
The sed scripts (binary.sed, binary2.sed, binary3.sed) are large and
could function as stand-alone programs - there are kept as separate
files. The input/expected output are removed, and a new script is
added to run the tests.

* testsuite/binary.sh: New script.
* testsuite/binary.inp, testsuite/binary.good: Removed.
* testsuite/local.mk (EXTRA_DIST): Remove inp/good files.
(SEDTEST): Remove tests.
(T): Add new test.
2017-05-10 21:37:28 -04:00
Assaf Gordon 4f8c2c8ba2 tests: convert "8bit" test to new framework
The input (8bit.inp) and expected output (8bit.good) contains non-ascii
octets, and are kept as-is. The sed program is converted to newer
init.sh-style tests.

* testsuite/8bit.sed: Removed.
* testsuite/8bit.sh: New test.
* testsuite/local.mk (EXTRA_DIST): Remove 8bit.sed.
(SEDTEST) Remove 8bit.sed.
(T): Add 8bit.sh.
2017-05-10 21:37:28 -04:00
Assaf Gordon 96b8cec2aa tests: new function remove_cr_inplace in init.cfg
When testing on Windows OSes, remove any CR (\r) characters
from output files (before comparing them to expected output).

This functionality was used by the old-style tests, embedded
directly in 'Makefile.tests'.

* init.cfg: (remove_cr_inplace): New function.
2017-05-10 21:37:28 -04:00
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