Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 30 Jul 2020 13:36:24 +0000 (UTC)
From:      Kyle Evans <kevans@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r363693 - head/usr.bin/sed/tests
Message-ID:  <202007301336.06UDaOva018855@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kevans
Date: Thu Jul 30 13:36:24 2020
New Revision: 363693
URL: https://svnweb.freebsd.org/changeset/base/363693

Log:
  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.

Modified:
  head/usr.bin/sed/tests/sed2_test.sh

Modified: head/usr.bin/sed/tests/sed2_test.sh
==============================================================================
--- head/usr.bin/sed/tests/sed2_test.sh	Thu Jul 30 13:33:45 2020	(r363692)
+++ head/usr.bin/sed/tests/sed2_test.sh	Thu Jul 30 13:36:24 2020	(r363693)
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202007301336.06UDaOva018855>