Fixed iteration set stress test under 32bit architecture
[libcds.git] / test / stress / data / split.pl
index 3d0f4c7568d5f83cdc7daf675ee7358ecd9e5923..29887d927a7380596b32d50a3b132e575b81592f 100644 (file)
@@ -2,7 +2,10 @@
 \r
 my %words ;\r
 \r
-open( my $f, "text.txt" ) ;\r
+my $input_file = shift;\r
+my $output_file = shift;\r
+\r
+open( my $f, $input_file ) or die "Cannot open input file $input_file";\r
 binmode $f ;\r
 \r
 my $text = ''  ;\r
@@ -26,14 +29,14 @@ for (my $j = 1; $j < 30; ++$j ) {
        }\r
 }\r
 \r
-open (my $dst, ">dictionary.txt") ;\r
+open (my $dst, ">$output_file") or die "Cannot open output file $output_file";\r
 binmode $dst ;\r
 \r
 my $nCount = 0 ;\r
 $nCount++ foreach (keys %words) ;\r
 print $dst $nCount, "\n" ;\r
 \r
-print "Generate test dictionary...\n" ;\r
+print "Generate test dictionary $output_file ...\n" ;\r
 print $dst $_, "\n" foreach (keys %words)      ;\r
 \r
 close $dst  ;\r