/[grep]/grep/tests/foad1.sh
ViewVC logotype

Diff of /grep/tests/foad1.sh

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.8 by charles_levert, Tue Jun 14 20:56:42 2005 UTC revision 1.9 by charles_levert, Wed Jun 15 18:55:28 2005 UTC
# Line 82  grep_test "A/CX/B/C/" "A/B/C/" -wF -e A Line 82  grep_test "A/CX/B/C/" "A/B/C/" -wF -e A
82  grep_test "LIN7C 55327/" "" -wF -e 5327 -e 5532  grep_test "LIN7C 55327/" "" -wF -e 5327 -e 5532
83    
84    
85  u=cs_CZ.UTF-8  # The rest of this file is meant to be executed under this locale.
86    LC_ALL=cs_CZ.UTF-8; export LC_ALL
87  # If the UTF-8 locale doesn't work, skip these tests silently.  # If the UTF-8 locale doesn't work, skip these tests silently.
88  if LC_ALL="$u" locale -k LC_CTYPE 2>/dev/null |  locale -k LC_CTYPE 2>/dev/null | "${GREP}" -q "charmap.*UTF-8" || exit $failures
   "${GREP}" -q "charmap.*UTF-8"  
 then  
   # Test character class erroneously matching a '[' character.  
   LC_ALL="$u" grep_test "[/" "" "[[:alpha:]]" -E  
   
   for mode in F G E; do  
     # Hint:  pipe the output of these tests in  
     #        "| LESS= LESSCHARSET=ascii less".  
     # LETTER N WITH TILDE is U+00F1 and U+00D1.  
     # LETTER Y WITH DIAERESIS is U+00FF and U+0178.  
     LC_ALL="$u" grep_test 'añÿb/AÑŸB/' 'ñÿ/ÑŸ/' 'ñÿ' -o -i -$mode  
     LC_ALL="$u" grep_test 'añÿb/AÑŸB/' 'ñÿ/ÑŸ/' 'ÑŸ' -o -i -$mode  
     LC_ALL="$u" grep_test 'añÿb/AÑŸB/' "a${CB}ñÿ${CE}b/A${CB}ÑŸ${CE}B/" 'ñÿ' --color=always -i -$mode  
     LC_ALL="$u" grep_test 'añÿb/AÑŸB/' "a${CB}ñÿ${CE}b/A${CB}ÑŸ${CE}B/" 'ÑŸ' --color=always -i -$mode  
   
     # POSIX (about -i):  ... each character in the string is matched  
     # against the pattern, not only the character, but also its case  
     # counterpart (if any), shall be matched.  
     # The following were chosen because of their trickiness due to the  
     # differing UTF-8 octet length of their counterpart and to the  
     # non-reflexivity of their mapping.  
     # Beware of homographs!  Look carefully at the actual octets.  
   
     # lc(U+0130 LATIN CAPITAL LETTER I WITH DOT ABOVE) = U+0069 LATIN SMALL LETTER I  
     LC_ALL="$u" grep_test 'aİb/' "a${CB}İ${CE}b/" 'i' --color=always -i -$mode  
     LC_ALL="$u" grep_test 'aib/' ''               'İ' --color=always -i -$mode  
     LC_ALL="$u" grep_test 'aİb/' ''               'I' --color=always -i -$mode  
     # uc(U+0131 LATIN SMALL LETTER DOTLESS I)          = U+0049 LATIN CAPITAL LETTER I  
     LC_ALL="$u" grep_test 'aıb/' "a${CB}ı${CE}b/" 'I' --color=always -i -$mode  
     LC_ALL="$u" grep_test 'aIb/' ''               'ı' --color=always -i -$mode  
     LC_ALL="$u" grep_test 'aıb/' ''               'i' --color=always -i -$mode  
     # uc(U+017F LATIN SMALL LETTER LONG S)             = U+0053 LATIN CAPITAL LETTER S  
     LC_ALL="$u" grep_test 'aſb/' "a${CB}ſ${CE}b/" 'S' --color=always -i -$mode  
     LC_ALL="$u" grep_test 'aSb/' ''               'ſ' --color=always -i -$mode  
     LC_ALL="$u" grep_test 'aſb/' ''               's' --color=always -i -$mode  
     # uc(U+1FBE GREEK PROSGEGRAMMENI)                  = U+0399 GREEK CAPITAL LETTER IOTA  
     LC_ALL="$u" grep_test 'aιb/' "a${CB}ι${CE}b/" 'Ι' --color=always -i -$mode  
     LC_ALL="$u" grep_test 'aΙb/' ''               'ι' --color=always -i -$mode  
     LC_ALL="$u" grep_test 'aιb/' ''               'ι' --color=always -i -$mode  
     # lc(U+2126 OHM SIGN)                              = U+03C9 GREEK SMALL LETTER OMEGA  
     LC_ALL="$u" grep_test 'aΩb/' "a${CB}Ω${CE}b/" 'ω' --color=always -i -$mode  
     LC_ALL="$u" grep_test 'aωb/' ''               'Ω' --color=always -i -$mode  
     LC_ALL="$u" grep_test 'aΩb/' ''               'Ω' --color=always -i -$mode  
     # lc(U+212A KELVIN SIGN)                           = U+006B LATIN SMALL LETTER K  
     LC_ALL="$u" grep_test 'aKb/' "a${CB}K${CE}b/" 'k' --color=always -i -$mode  
     LC_ALL="$u" grep_test 'akb/' ''               'K' --color=always -i -$mode  
     LC_ALL="$u" grep_test 'aKb/' ''               'K' --color=always -i -$mode  
     # lc(U+212B ANGSTROM SIGN)                         = U+00E5 LATIN SMALL LETTER A WITH RING ABOVE  
     LC_ALL="$u" grep_test 'aÅb/' "a${CB}Å${CE}b/" 'å' --color=always -i -$mode  
     LC_ALL="$u" grep_test 'aåb/' ''               'Å' --color=always -i -$mode  
     LC_ALL="$u" grep_test 'aÅb/' ''               'Å' --color=always -i -$mode  
   done  
 fi  
89    
90    # Test character class erroneously matching a '[' character.
91    grep_test "[/" "" "[[:alpha:]]" -E
92    
93    for mode in F G E; do
94      # Hint:  pipe the output of these tests in
95      #        "| LESS= LESSCHARSET=ascii less".
96      # LETTER N WITH TILDE is U+00F1 and U+00D1.
97      # LETTER Y WITH DIAERESIS is U+00FF and U+0178.
98      grep_test 'añÿb/AÑŸB/' 'ñÿ/ÑŸ/' 'ñÿ' -o -i -$mode
99      grep_test 'añÿb/AÑŸB/' 'ñÿ/ÑŸ/' 'ÑŸ' -o -i -$mode
100      grep_test 'añÿb/AÑŸB/' "a${CB}ñÿ${CE}b/A${CB}ÑŸ${CE}B/" 'ñÿ' --color=always -i -$mode
101      grep_test 'añÿb/AÑŸB/' "a${CB}ñÿ${CE}b/A${CB}ÑŸ${CE}B/" 'ÑŸ' --color=always -i -$mode
102    
103      # POSIX (about -i):  ... each character in the string is matched
104      # against the pattern, not only the character, but also its case
105      # counterpart (if any), shall be matched.
106      # The following were chosen because of their trickiness due to the
107      # differing UTF-8 octet length of their counterpart and to the
108      # non-reflexivity of their mapping.
109      # Beware of homographs!  Look carefully at the actual octets.
110    
111      # lc(U+0130 LATIN CAPITAL LETTER I WITH DOT ABOVE) = U+0069 LATIN SMALL LETTER I
112      grep_test 'aİb/' "a${CB}İ${CE}b/" 'i' --color=always -i -$mode
113      grep_test 'aib/' ''               'İ' --color=always -i -$mode
114      grep_test 'aİb/' ''               'I' --color=always -i -$mode
115      # uc(U+0131 LATIN SMALL LETTER DOTLESS I)          = U+0049 LATIN CAPITAL LETTER I
116      grep_test 'aıb/' "a${CB}ı${CE}b/" 'I' --color=always -i -$mode
117      grep_test 'aIb/' ''               'ı' --color=always -i -$mode
118      grep_test 'aıb/' ''               'i' --color=always -i -$mode
119      # uc(U+017F LATIN SMALL LETTER LONG S)             = U+0053 LATIN CAPITAL LETTER S
120      grep_test 'aſb/' "a${CB}ſ${CE}b/" 'S' --color=always -i -$mode
121      grep_test 'aSb/' ''               'ſ' --color=always -i -$mode
122      grep_test 'aſb/' ''               's' --color=always -i -$mode
123      # uc(U+1FBE GREEK PROSGEGRAMMENI)                  = U+0399 GREEK CAPITAL LETTER IOTA
124      grep_test 'aιb/' "a${CB}ι${CE}b/" 'Ι' --color=always -i -$mode
125      grep_test 'aΙb/' ''               'ι' --color=always -i -$mode
126      grep_test 'aιb/' ''               'ι' --color=always -i -$mode
127      # lc(U+2126 OHM SIGN)                              = U+03C9 GREEK SMALL LETTER OMEGA
128      grep_test 'aΩb/' "a${CB}Ω${CE}b/" 'ω' --color=always -i -$mode
129      grep_test 'aωb/' ''               'Ω' --color=always -i -$mode
130      grep_test 'aΩb/' ''               'Ω' --color=always -i -$mode
131      # lc(U+212A KELVIN SIGN)                           = U+006B LATIN SMALL LETTER K
132      grep_test 'aKb/' "a${CB}K${CE}b/" 'k' --color=always -i -$mode
133      grep_test 'akb/' ''               'K' --color=always -i -$mode
134      grep_test 'aKb/' ''               'K' --color=always -i -$mode
135      # lc(U+212B ANGSTROM SIGN)                         = U+00E5 LATIN SMALL LETTER A WITH RING ABOVE
136      grep_test 'aÅb/' "a${CB}Å${CE}b/" 'å' --color=always -i -$mode
137      grep_test 'aåb/' ''               'Å' --color=always -i -$mode
138      grep_test 'aÅb/' ''               'Å' --color=always -i -$mode
139    done
140    
141    
142    # Any tests inserted right here will be performed under an UTF-8 locale.
143    # Insert them before LC_ALL is set above to avoid this.
144    # Leave this comment last.
145    
146  exit $failures  exit $failures

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26