diff options
author | Jim Meyering <meyering@fb.com> | 2015-12-27 21:56:04 -0800 |
---|---|---|
committer | Jim Meyering <meyering@fb.com> | 2015-12-27 22:36:47 -0800 |
commit | 9dd563c897eba7bebf150f2ef6b0db3e72b7d7a2 (patch) | |
tree | c1c5f945a8683c1082cd7742714bfa4e6a66331b /testsuite/invalid-mb-seq-UMR.sh | |
parent | 67b3fcc980a9e20c13d0bf4ff35c97ab84e96b5b (diff) | |
download | sed-9dd563c897eba7bebf150f2ef6b0db3e72b7d7a2.tar.gz |
sed: do not elide an invalid byte in a substitution RHS
Now, sed copies such bytes into the output.
* sed/execute.c (str_append_modified): Copy each invalid byte
into the result string, as the comment suggests.
* testsuite/invalid-mb-seq-UMR.sh: Adjust this test to conform.
Perl does the same thing. Also, remove an unnecessary "-e" option.
* NEWS (Bug fixes): Mention it.
Bug introduced prior to the switch to git in 2004,
between the releases of sed-4.0.9 and sed-4.1.
This addresses http://debbugs.gnu.org/22254.
Diffstat (limited to 'testsuite/invalid-mb-seq-UMR.sh')
-rwxr-xr-x | testsuite/invalid-mb-seq-UMR.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/testsuite/invalid-mb-seq-UMR.sh b/testsuite/invalid-mb-seq-UMR.sh index f631e24..0c17b9a 100755 --- a/testsuite/invalid-mb-seq-UMR.sh +++ b/testsuite/invalid-mb-seq-UMR.sh @@ -24,9 +24,9 @@ require_valgrind_ test "$LOCALE_JA" = none && skip_ found no Japanese EUC locale echo a > in || framework_failure_ -echo bC > exp || framework_failure_ +printf 'b\262C\n' > exp || framework_failure_ LC_ALL=$LOCALE_JA valgrind --quiet --error-exitcode=1 \ - sed -e 's/a/b\U\xb2c/' in > out 2> err || fail=1 + sed 's/a/b\U\xb2c/' in > out 2> err || fail=1 # Work around a bug in CentOS 5.10's valgrind # FIXME: remove in 2018 or when CentOS 5 is no longer officially supported |