Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | #!/usr/bin/perl |
michael@0 | 2 | use LWP::Simple; |
michael@0 | 3 | use IO::Handle; |
michael@0 | 4 | $stdout = *STDOUT; |
michael@0 | 5 | open(RES , ">resultlog.txt") || die "cannot open result log file"; |
michael@0 | 6 | #system("rm alldiff.txt in*.txt out*.txt"); |
michael@0 | 7 | for($i=10;$i<909;$i++) |
michael@0 | 8 | { |
michael@0 | 9 | RES->printf("Test Page %d \n", $i); |
michael@0 | 10 | $url = "http://people.netscape.com/ftang/testscript/gb18030/gbtext.cgi?page=" . $i; |
michael@0 | 11 | RES->printf( "URL = %s\n", $url); |
michael@0 | 12 | $tmpfile = "> in". $i . ".txt"; |
michael@0 | 13 | open STDOUT, $tmpfile || RES->print("cannot open " . $tmpfile . "\n"); |
michael@0 | 14 | getprint $url; |
michael@0 | 15 | $cmd2 = "../../../dist/win32_d.obj/bin/nsconv -f GB18030 -t GB18030 in" . $i . ".txt out" . $i . ".txt >err"; |
michael@0 | 16 | $cmd3 = "diff -u in" . $i . ".txt out" . $i . ".txt >> alldiff.txt"; |
michael@0 | 17 | RES->printf( "Run '%s'\n", $cmd2); |
michael@0 | 18 | $st2 = system($cmd2); |
michael@0 | 19 | RES->printf( "result = '%d'\n", $st2); |
michael@0 | 20 | RES->printf( "Run '%s'\n", $cmd3); |
michael@0 | 21 | $st3 = system($cmd3); |
michael@0 | 22 | RES->printf( "result = '%d'\n", $st3); |
michael@0 | 23 | } |