intl/uconv/tests/stressgb.pl

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/intl/uconv/tests/stressgb.pl	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,23 @@
     1.4 +#!/usr/bin/perl
     1.5 +use LWP::Simple;
     1.6 +use IO::Handle;
     1.7 +$stdout = *STDOUT;
     1.8 +open(RES , ">resultlog.txt") || die "cannot open result log file";
     1.9 +#system("rm alldiff.txt in*.txt out*.txt");
    1.10 +for($i=10;$i<909;$i++)
    1.11 +{
    1.12 +   RES->printf("Test Page %d \n", $i);
    1.13 +   $url = "http://people.netscape.com/ftang/testscript/gb18030/gbtext.cgi?page=" . $i;
    1.14 +   RES->printf( "URL = %s\n", $url);
    1.15 +   $tmpfile = "> in". $i . ".txt";
    1.16 +   open STDOUT, $tmpfile || RES->print("cannot open " . $tmpfile . "\n");
    1.17 +   getprint $url;
    1.18 +   $cmd2 = "../../../dist/win32_d.obj/bin/nsconv -f GB18030 -t GB18030 in" . $i . ".txt out" . $i . ".txt >err";
    1.19 +   $cmd3 = "diff -u in" . $i . ".txt out" . $i . ".txt >> alldiff.txt";
    1.20 +   RES->printf( "Run  '%s'\n", $cmd2);
    1.21 +   $st2 = system($cmd2);
    1.22 +   RES->printf( "result = '%d'\n", $st2);
    1.23 +   RES->printf( "Run  '%s'\n", $cmd3);
    1.24 +   $st3 = system($cmd3);
    1.25 +   RES->printf( "result = '%d'\n", $st3);
    1.26 +}

mercurial