1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-11-27 08:00:11 +00:00

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.
This commit is contained in:
Kyle Evans 2020-07-30 13:36:24 +00:00
parent ac05de1788
commit 98369a6980
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=363693

View File

@ -109,11 +109,9 @@ hex_subst_body()
# Single digit \x should work as well.
atf_check -o "inline:xn" sed 's/\xd/x/' c
# Invalid digit should cause us to ignore the sequence. This test
# invokes UB, escapes of an ordinary character. A future change will
# make regex(3) on longer tolerate this and we'll need to adjust what
# we're doing, but for now this will suffice.
atf_check -o "inline:" sed 's/\xx//' d
# This should get passed through to the underlying regex engine as
# \xx, which is an invalid escape of an ordinary character.
atf_check -s exit:1 -e not-empty sed 's/\xx//' d
}
atf_test_case commands_on_stdin