VirtualBox

source: kBuild/trunk/src/grep/tests/spencer1-locale.awk

Last change on this file was 3529, checked in by bird, 3 years ago

Imported grep 3.7 from grep-3.7.tar.gz (sha256: c22b0cf2d4f6bbe599c902387e8058990e1eee99aef333a203829e5fd3dbb342), applying minimal auto-props.

File size: 929 bytes
Line 
1# Copyright (C) 1988 Henry Spencer.
2# Copyright (C) 2009-2021 Free Software Foundation, Inc.
3#
4# Copying and distribution of this file, with or without modification,
5# are permitted in any medium without royalty provided the copyright
6# notice and this notice are preserved.
7
8BEGIN {
9 FS = "@";
10 printf ("failures=0\n");
11}
12
13$0 !~ /^#/ && NF == 3 {
14 test("en_US.UTF-8")
15 test("ru_RU.KOI8-R")
16 test("fr_FR.ISO-8859-1")
17 test("zh_CN")
18 if (extra_locale != "") {
19 test(extra_locale)
20 }
21}
22
23function test(locale)
24{
25 printf ("status=$(echo '%s'| { LC_ALL=%s grep -E -e '%s' >/dev/null 2>&1 ; echo $?; })\n",$3, locale, $2);
26 printf ("if test $status -ne %s ; then\n", $1);
27 printf ("\techo Spencer test \\#%d failed \\(%s\\)\n", ++n, locale);
28 printf ("\tfailures=1\n");
29 printf ("fi\n");
30}
31
32END { printf ("exit $failures\n"); }
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette