Subject: [PATCH 1/1] tests: make surrogate-pair pass under Cygwin

From: Duncan Roe <[email-masked]>
Date: Wed, 24 Nov 2021 12:31:43 +1100

* NEWS: Add to "Bug fixes" (3 bugs fixed)
* tests/surrogate-pair: Skip 3rd test if cygwin

Signed-off-by: Duncan Roe <[email-masked]>
---
 NEWS                 | 4 ++++
 tests/surrogate-pair | 2 ++
 2 files changed, 6 insertions(+)

diff --git a/NEWS b/NEWS
index 5015580..e440932 100644
--- a/NEWS
+++ b/NEWS
@@ -16,6 +16,10 @@ GNU grep NEWS                                    -*- outline -*-
   The -s option no longer suppresses "binary file matches" messages.
   [Bug#51860 introduced in grep 3.5]
 
+  The last test in surrogate-pair would fail under Cygwin owing to a permanent
+  restriction. Skip this test so the rest of surrogate-pair passes.
+  [Bug#27555, Bug#49983, Bug#51698]
+
 
 * Noteworthy changes in release 3.7 (2021-08-14) [stable]
 
diff --git a/tests/surrogate-pair b/tests/surrogate-pair
index a91fa36..784b8f0 100755
--- a/tests/surrogate-pair
+++ b/tests/surrogate-pair
@@ -52,6 +52,8 @@ case $io_pair in
 esac
 
 # Also test whether a surrogate-pair in the search string works.
+# This never works under cygwin, so skip it there.
+[ "$(uname -s | cut -c1-6)" != CYGWIN ] || Exit $fail
 for opt in '' -i -E -F -iE -iF; do
   grep --file=in $opt in > out 2>&1 || fail=1
   compare out in || fail=1
-- 
2.17.5