grep-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

grep branch, master, updated. v3.7-66-ge4a7108


From: Paul Eggert
Subject: grep branch, master, updated. v3.7-66-ge4a7108
Date: Tue, 17 May 2022 16:49:42 -0400 (EDT)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "grep".

The branch, master has been updated
       via  e4a71086bf8143ae083f4e97d8226f30c7e1a079 (commit)
      from  a7c8349894d24cf50e19ae4a6b10fa89d1fd9d87 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/grep.git/commit/?id=e4a71086bf8143ae083f4e97d8226f30c7e1a079


commit e4a71086bf8143ae083f4e97d8226f30c7e1a079
Author: Paul Eggert <eggert@cs.ucla.edu>
Date:   Tue May 17 13:47:44 2022 -0700

    tests: improve tests of ‘.’
    
    * tests/hangul-syllable: Test some encoding errors too.

diff --git a/tests/hangul-syllable b/tests/hangul-syllable
index 9f94d2e..fce5c2c 100755
--- a/tests/hangul-syllable
+++ b/tests/hangul-syllable
@@ -12,6 +12,7 @@ require_en_utf8_locale_
 LC_ALL=en_US.UTF-8
 export LC_ALL
 
+# Check that '.' completely matches $1, i.e., that $1 is a single UTF-8 char.
 check_char ()
 {
   printf "$1\\n" >in || framewmork_failure_
@@ -20,27 +21,52 @@ check_char ()
   cmp in out || fail=1
 }
 
+# Check that '.*' does not completely match $1, i.e., that
+# $1 contains an encoding error.
+check_nonchar ()
+{
+  printf "$1\\n" >in || framewmork_failure_
+
+  grep -a -v '^.*$' in >out || fail=1
+  cmp in out || fail=1
+}
+
 fail=0
 
 # "." should match U+D45C HANGUL SYLLABLE PYO.
 check_char '\355\221\234'
 
-# Check boundary-condition characters
+# Check boundary-condition characters, and non-characters,
 # while we are at it.
 
 check_char '\0' -a
 check_char '\177'
+check_nonchar '\200'
+check_nonchar '\277'
+check_nonchar '\300\200'
+check_nonchar '\301\277'
 
 for i in 302 337; do
   for j in 200 277; do
     check_char "\\$i\\$j"
   done
+  for j in 177 300; do
+    check_nonchar "\\$i\\$j"
+  done
 done
 for i in 340; do
   for j in 240 277; do
     for k in 200 277; do
       check_char "\\$i\\$j\\$k"
     done
+    for k in 177 300; do
+      check_nonchar "\\$i\\$j\\$k"
+    done
+  done
+  for j in 239 300; do
+    for k in 177 200 277 300; do
+      check_nonchar "\\$i\\$j\\$k"
+    done
   done
 done
 for i in 341 354 356 357; do
@@ -48,6 +74,14 @@ for i in 341 354 356 357; do
     for k in 200 277; do
       check_char "\\$i\\$j\\$k"
     done
+    for k in 177 300; do
+      check_nonchar "\\$i\\$j\\$k"
+    done
+  done
+  for j in 177 300; do
+    for k in 177 200 277 300; do
+      check_nonchar "\\$i\\$j\\$k"
+    done
   done
 done
 for i in 355; do
@@ -55,6 +89,14 @@ for i in 355; do
     for k in 200 277; do
       check_char "\\$i\\$j\\$k"
     done
+    for k in 177 300; do
+      check_nonchar "\\$i\\$j\\$k"
+    done
+  done
+  for j in 177 240; do
+    for k in 177 200 277 300; do
+      check_nonchar "\\$i\\$j\\$k"
+    done
   done
 done
 for i in 360; do
@@ -63,6 +105,21 @@ for i in 360; do
       for l in 200 277; do
         check_char "\\$i\\$j\\$k\\$l"
       done
+      for l in 177 300; do
+        check_nonchar "\\$i\\$j\\$k\\$l"
+      done
+    done
+    for k in 177 300; do
+      for l in 177 200 277 300; do
+        check_nonchar "\\$i\\$j\\$k\\$l"
+      done
+    done
+  done
+  for j in 217 300; do
+    for k in 177 200 277 300; do
+      for l in 177 200 277 300; do
+        check_nonchar "\\$i\\$j\\$k\\$l"
+      done
     done
   done
 done
@@ -72,6 +129,21 @@ for i in 361 363; do
       for l in 200 277; do
         check_char "\\$i\\$j\\$k\\$l"
       done
+      for l in 177 300; do
+        check_nonchar "\\$i\\$j\\$k\\$l"
+      done
+    done
+    for k in 177 300; do
+      for l in 177 200 277 300; do
+        check_nonchar "\\$i\\$j\\$k\\$l"
+      done
+    done
+  done
+  for j in 177 300; do
+    for k in 177 200 277 300; do
+      for l in 177 200 277 300; do
+        check_nonchar "\\$i\\$j\\$k\\$l"
+      done
     done
   done
 done
@@ -81,6 +153,21 @@ for i in 364; do
       for l in 200 277; do
         check_char "\\$i\\$j\\$k\\$l"
       done
+      for l in 177 300; do
+        check_nonchar "\\$i\\$j\\$k\\$l"
+      done
+    done
+    for k in 177 300; do
+      for l in 177 200 277 300; do
+        check_nonchar "\\$i\\$j\\$k\\$l"
+      done
+    done
+  done
+  for j in 177 220; do
+    for k in 177 200 277 300; do
+      for l in 177 200 277 300; do
+        check_nonchar "\\$i\\$j\\$k\\$l"
+      done
     done
   done
 done

-----------------------------------------------------------------------

Summary of changes:
 tests/hangul-syllable | 89 ++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 88 insertions(+), 1 deletion(-)


hooks/post-receive
-- 
grep



reply via email to

[Prev in Thread] Current Thread [Next in Thread]