VirtualBox

source: kBuild/vendor/grep/2.12/tests/spencer1-locale.awk@ 3627

Last change on this file since 3627 was 2595, checked in by bird, 13 years ago

gnu grep version 2.12 (grep-2.12.tar.xz, md5sum=8d2f0346d08b13c18afb81f0e8aa1e2f)

File size: 929 bytes
Line 
1# Copyright (C) 1988 Henry Spencer.
2# Copyright (C) 2009-2012 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