summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier Leroy <xavier.leroy@inria.fr>1996-04-29 16:57:15 +0000
committerXavier Leroy <xavier.leroy@inria.fr>1996-04-29 16:57:15 +0000
commit5dbdb514dc516e246baeba061c7929ceba2a1350 (patch)
tree941a400f3fa9b9b691ea44db67254a752dc7934a
parentfaa0ecf942daba26bc9080517f0d65175cecb021 (diff)
Lire nom du fichier d'entree sur la ligne de commande.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@780 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r--otherlibs/threads/Tests/testio.ml26
1 files changed, 14 insertions, 12 deletions
diff --git a/otherlibs/threads/Tests/testio.ml b/otherlibs/threads/Tests/testio.ml
index 8f07027c6..8a7b2d207 100644
--- a/otherlibs/threads/Tests/testio.ml
+++ b/otherlibs/threads/Tests/testio.ml
@@ -70,31 +70,33 @@ let make_lines ofile =
(* The test *)
let main() =
+ let ifile = Sys.argv.(1) in
+ let ofile = "/tmp/testio" in
test "256-byte chunks, 256-byte chunks"
- (copy_file 256) (copy_file 256) "/vmunix" "/tmp/testio";
+ (copy_file 256) (copy_file 256) ifile ofile;
test "4096-byte chunks, 4096-byte chunks"
- (copy_file 4096) (copy_file 4096) "/vmunix" "/tmp/testio";
+ (copy_file 4096) (copy_file 4096) ifile ofile;
test "65536-byte chunks, 65536-byte chunks"
- (copy_file 65536) (copy_file 65536) "/vmunix" "/tmp/testio";
+ (copy_file 65536) (copy_file 65536) ifile ofile;
test "256-byte chunks, 4096-byte chunks"
- (copy_file 256) (copy_file 4096) "/vmunix" "/tmp/testio";
+ (copy_file 256) (copy_file 4096) ifile ofile;
test "4096-byte chunks, 256-byte chunks"
- (copy_file 4096) (copy_file 256) "/vmunix" "/tmp/testio";
+ (copy_file 4096) (copy_file 256) ifile ofile;
test "4096-byte chunks, 65536-byte chunks"
- (copy_file 4096) (copy_file 65536) "/vmunix" "/tmp/testio";
+ (copy_file 4096) (copy_file 65536) ifile ofile;
test "263-byte chunks, 4011-byte chunks"
- (copy_file 263) (copy_file 4011) "/vmunix" "/tmp/testio";
+ (copy_file 263) (copy_file 4011) ifile ofile;
test "613-byte chunks, 1027-byte chunks"
- (copy_file 613) (copy_file 1027) "/vmunix" "/tmp/testio";
+ (copy_file 613) (copy_file 1027) ifile ofile;
test "0...8192 byte chunks"
- (copy_random 8192) (copy_random 8192) "/vmunix" "/tmp/testio";
+ (copy_random 8192) (copy_random 8192) ifile ofile;
test "line per line, short lines"
- copy_line copy_line "/etc/hosts" "/tmp/testio";
+ copy_line copy_line "/etc/hosts" ofile;
make_lines "/tmp/lines";
test "line per line, short and long lines"
- copy_line copy_line "/tmp/lines" "/tmp/testio";
+ copy_line copy_line "/tmp/lines" ofile;
Sys.remove "/tmp/lines";
- Sys.remove "/tmp/testio";
+ Sys.remove ofile;
exit 0
let _ = Unix.handle_unix_error main (); exit 0