Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Unified Diff: icu46/source/test/compat/tzone.pl

Issue 5516007: Check in the pristine copy of ICU 4.6... (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/
Patch Set: Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « icu46/source/test/compat/tzdate.c ('k') | icu46/source/test/hdrtst/Makefile.in » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: icu46/source/test/compat/tzone.pl
===================================================================
--- icu46/source/test/compat/tzone.pl (revision 0)
+++ icu46/source/test/compat/tzone.pl (revision 0)
@@ -0,0 +1,65 @@
+#!/usr/bin/perl
+#
+# Copyright (C) 2007-2007, International Business Machines
+# Corporation and others. All Rights Reserved.
+#
+
+if ($ARGV[0] eq '-h' || $ARGV[0] eq '--help') {
+ print "Usage: tzone [year month day hour minute]\n";
+ exit(0);
+}
+
+my $LIBRARY = '../../lib';
+
+my @TZONE_RAW = `locate zoneinfo | grep '^/usr/share/zoneinfo/' | grep -v 'tab\$' | grep -v '/right/' | grep -v '/posix/' | grep -v '/posixrules\$' | grep -v '/Factory\$'`;
+my @TZONE;
+my $index = 0;
+my $USECURRENT = 0;
+my $year = 0;
+my $month = 0;
+my $day = 0;
+my $hour = 0;
+my $minute = 0;
+
+
+if (scalar(@ARGV) == 5) {
+ ($year, $month, $day, $hour, $minute) = @ARGV;
+ print "The date we are using is: $month-$day-$year $hour:$minute.\n";
+} else {
+ print "We are using the current date.\n";
+ $USECURRENT = 1;
+}
+
+#filter out the time zones
+foreach my $tzone (@TZONE_RAW) {
+ chomp($tzone);
+ if (-e $tzone) {
+ $TZONE[$index] = substr($tzone, 20);
+ $index++;
+ }
+}
+
+#go through each timezone and test
+$count = 0;
+$ENV{'LD_LIBRARY_PATH'} = $LIBRARY;
+
+print "The following time zones had wrong results.\n";
+
+foreach my $tzone (@TZONE) {
+ #set system time zone
+ $ENV{'TZ'} = "$tzone";
+
+ my @result = `./tzdate $year $month $day $hour $minute $USECURRENT`;
+
+ #if the result is wrong print the time zone information to a log file
+ if (scalar(@result) > 0) {
+ print "\nTIME ZONE: $tzone\n";
+ print "@result\n";
+ $count++;
+ }
+}
+
+print "\nThe number of time zones with wrong results: $count out of $index\n";
+
+print("\n\nGood Bye!\n");
+exit(0);
Property changes on: icu46/source/test/compat/tzone.pl
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:eol-style
+ LF
« no previous file with comments | « icu46/source/test/compat/tzdate.c ('k') | icu46/source/test/hdrtst/Makefile.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698