summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <meyering@fb.com>2020-01-11 11:50:45 -0800
committerJim Meyering <meyering@fb.com>2020-01-11 16:18:50 -0800
commit5766a986477635fbbe58b8a668b2c8221f2c9fe5 (patch)
tree5d910331a6b8448e948e54cea4994c3ffe9b632a
parent598c3a0dd90b40547356c5ebd0b723282e039ab6 (diff)
downloadsed-5766a986477635fbbe58b8a668b2c8221f2c9fe5.tar.gz
tests: avoid hpux11 test failure
* testsuite/title-case.sh: Correct printf usage not to trigger unspecified behavior for '\(\)'. Instead, just use sed with its -r option so those parentheses don't need any backslash at all. Reported by Bruno Haible in https://lists.gnu.org/r/sed-devel/2020-01/msg00008.html
-rwxr-xr-xtestsuite/title-case.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/testsuite/title-case.sh b/testsuite/title-case.sh
index 9257a59..7d0d559 100755
--- a/testsuite/title-case.sh
+++ b/testsuite/title-case.sh
@@ -26,8 +26,8 @@ c='\363' # sigma
printf "$a\\n$b\\n$c\\n" >in || framework_failure_
for chr in "$a" "$b" "$c"; do
- printf '/\(\)\\1'"$chr"/Ip >prog || fail=1
- LC_ALL=el_GR.iso88597 sed -n -f prog in >out || fail=1
+ printf '/()\\1'"$chr"/Ip >prog || fail=1
+ LC_ALL=el_GR.iso88597 sed -r -n -f prog in >out || fail=1
compare_ in out || fail=1
done