#
003818ac |
| 23-Dec-2024 |
Mark Johnston <markj@FreeBSD.org> |
sed tests: Add a regression test for the c function
Based on the test case from PR 271817 by Mohamed Akram.
PR: 271817 MFC after: 2 weeks
|
#
5982237f |
| 23-Dec-2024 |
Mohamed Akram <mohd.akram@outlook.com> |
sed: Fix handling of an empty pattern space
Add a regression test.
PR: 271791 Obtained from: OpenBSD (1.38 millert) MFC after: 2 weeks
|
Revision tags: release/14.2.0 |
|
#
0552fdc6 |
| 07-Nov-2024 |
Martin Cracauer <cracauer@FreeBSD.org> |
sed: fix commandline-given expression when -e is not used
Make explicit sed commands (first on commandline) behave the same as those given with -e.
Without this patch the following two commands beh
sed: fix commandline-given expression when -e is not used
Make explicit sed commands (first on commandline) behave the same as those given with -e.
Without this patch the following two commands behave differently, the second one being wrong: echo ab | sed -e $'1 i\\\n--' echo ab | sed $'1 i\\\n--'
Reviewed by: 0mp, des, kevans Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D47377
show more ...
|
Revision tags: release/13.4.0, release/14.1.0, release/13.3.0, release/14.0.0 |
|
#
d0b2dbfa |
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
Remove $FreeBSD$: one-line sh pattern
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
|
Revision tags: release/13.2.0, release/12.4.0, release/13.1.0, release/12.3.0, release/13.0.0, release/12.2.0 |
|
#
c7aa572c |
| 31-Jul-2020 |
Glen Barber <gjb@FreeBSD.org> |
MFH
Sponsored by: Rubicon Communications, LLC (netgate.com)
|
#
17996960 |
| 31-Jul-2020 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r363583 through r363738.
|
#
98369a69 |
| 30-Jul-2020 |
Kyle Evans <kevans@FreeBSD.org> |
sed: fix hex_subst test after after r363679
r363679 is in-fact the future change referenced by the comment, helpfully left and forgotten by kevans. Instead of just silently not matching, we should n
sed: fix hex_subst test after after r363679
r363679 is in-fact the future change referenced by the comment, helpfully left and forgotten by kevans. Instead of just silently not matching, we should now be erroring out with vigor.
show more ...
|
#
14fdf163 |
| 26-Jul-2020 |
Yuri Pankov <yuripv@FreeBSD.org> |
sed: treat '[' as ordinary character in 'y' command
'y' does not handle bracket expressions, treat '[' as ordinary character and do not apply bracket expression checks (GNU sed agrees).
PR: 247931
sed: treat '[' as ordinary character in 'y' command
'y' does not handle bracket expressions, treat '[' as ordinary character and do not apply bracket expression checks (GNU sed agrees).
PR: 247931 Reviewed by: pfg, kevans Tested by: antoine (exp-run), Quentin L'Hours <lhoursquentin@gmail.com> Differential Revision: https://reviews.freebsd.org/D25640
show more ...
|
Revision tags: release/11.4.0 |
|
#
c6f7593c |
| 11-Jun-2020 |
Mateusz Piotrowski <0mp@FreeBSD.org> |
Remove some more duplicate test cases I accidentally committed
Reported by: markj, yuripv MFC after: 2 weeks X-MFC-With: 362017
|
#
df471ef4 |
| 11-Jun-2020 |
Mateusz Piotrowski <0mp@FreeBSD.org> |
Remove duplicate lines from sed tests
Reported by: yuripv Approved by: pfg (src) MFC after: 2 weeks X-MFC-With: 362017
|
#
f9ab72bb |
| 10-Jun-2020 |
Mateusz Piotrowski <0mp@FreeBSD.org> |
Read commands from stdin when -f - is passed to sed(1)
This patch teaches sed to interpret a "-" in a special way when given as an argument to the -f flag.
This behavior is also present in GNU sed.
Read commands from stdin when -f - is passed to sed(1)
This patch teaches sed to interpret a "-" in a special way when given as an argument to the -f flag.
This behavior is also present in GNU sed.
PR: 244872 Tested by: antoine (exp-run) Reviewed by: pfg, tobik (older version) Approved by: pfg (src) Relnotes: yes MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D24079
show more ...
|
#
3a4d70c5 |
| 07-Jun-2020 |
Kyle Evans <kevans@FreeBSD.org> |
sed: attempt to learn about hex escapes (e.g. \x27)
Somewhat predictably, software often wants to use \x27/\x24 among others so that they can decline worrying about ugly escaping, if said escaping i
sed: attempt to learn about hex escapes (e.g. \x27)
Somewhat predictably, software often wants to use \x27/\x24 among others so that they can decline worrying about ugly escaping, if said escaping is even possible. Right now, this software is using these and getting the wrong results, as we'll interpret those as x27 and x24 respectively. Some examples of this, when an exp-run was ran, were science/octopus and misc/vifm.
Go ahead and process these at all times. We allow either one or two digits, and the tests account for both. If extra digits are specified, e.g. \x2727, then the third and fourth digits are interpreted literally as one might expect.
PR: 229925 MFC after: 2 weeks
show more ...
|
#
6e816d87 |
| 10-Dec-2019 |
Kyle Evans <kevans@FreeBSD.org> |
sed: process \r, \n, and \t
This is both reasonable and a common GNUism that a lot of ported software expects.
Universally process \r, \n, and \t into carriage return, newline, and tab respectively
sed: process \r, \n, and \t
This is both reasonable and a common GNUism that a lot of ported software expects.
Universally process \r, \n, and \t into carriage return, newline, and tab respectively. Newline still doesn't function in contexts where it can't (e.g. BRE), but we process it anyways rather than passing UB \n (escaped ordinary) through to the underlying regex engine.
Adding a --posix flag to disable these was considered, but sed.1 already declares this version of sed a super-set of POSIX specification and this behavior is the most likely expected when one attempts to use one of these escape sequences in pattern space.
This differs from pre-r197362 behavior in that we now honor the three arguably most common escape sequences used with sed(1) and we do so outside of character classes, too.
Other escape sequences, like \s and \S, will come later when GNU extensions are added to libregex; sed will likely link against libregex by default, since the GNU extensions tend to be fairly un-intrusive.
PR: 229925 Reviewed by: bapt, emaste, pfg Differential Revision: https://reviews.freebsd.org/D22750
show more ...
|
Revision tags: release/12.1.0, release/11.3.0, release/12.0.0 |
|
#
da2d1e9d |
| 29-Aug-2018 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r338298 through r338391.
|
#
b4805026 |
| 29-Aug-2018 |
Mark Johnston <markj@FreeBSD.org> |
sed: Fix -i option behavior with 'q' command.
Don't just exit when encountering the 'q' command if we edit file inplace, and give mf_fgets() a chance to actually handle the inplace case.
Also add a
sed: Fix -i option behavior with 'q' command.
Don't just exit when encountering the 'q' command if we edit file inplace, and give mf_fgets() a chance to actually handle the inplace case.
Also add a regression test.
Submitted by: Yuri Pankov <yuripv@yuripv.net> Approved by: re (kib) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D16798
show more ...
|
Revision tags: release/11.2.0, release/10.4.0, release/11.1.0 |
|
#
1a36faad |
| 11-Feb-2017 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r313301 through r313643.
|
#
4a2dbde7 |
| 07-Feb-2017 |
Enji Cooper <ngie@FreeBSD.org> |
MFhead@r313398
|
#
e5816404 |
| 07-Feb-2017 |
Enji Cooper <ngie@FreeBSD.org> |
Don't expect :inplace_symlink_src to fail anymore (post-r313277)
The S_ISREG check was restored, such that the code will again fail with in-place replacements on symlinks
MFC after: 12 days X-MFC w
Don't expect :inplace_symlink_src to fail anymore (post-r313277)
The S_ISREG check was restored, such that the code will again fail with in-place replacements on symlinks
MFC after: 12 days X-MFC with: r313277 Sponsored by: Dell EMC Isilon
show more ...
|
#
9b3ece1c |
| 04-Feb-2017 |
Enji Cooper <ngie@FreeBSD.org> |
MFhead@r313243
|
#
a4aa656a |
| 22-Jan-2017 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r312309 through r312623.
|
#
68730a22 |
| 20-Jan-2017 |
Enji Cooper <ngie@FreeBSD.org> |
Add testcases for -i with hardlinks and symlinks
The symlink testcase is expected to fail, post-r312519 (the revert of r312404); mark it so.
MFC after: 3 weeks Sponsored by: Dell EMC Isilon
|