Skip to content

Commit 4c1a516

Browse files
Hugo Heuzardhhugo
authored andcommitted
test long commands
1 parent 9542e2c commit 4c1a516

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

testsuite/internal.ml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,24 @@
11
#use "internal_test_header.ml";;
22

3+
let () =
4+
let long_file i = Printf.sprintf "f%0100d" i in
5+
let last1 = ref "0" in
6+
let last2 = ref "1" in
7+
let files = List.init 200 (fun i ->
8+
let name = long_file i in
9+
let prev1 = !last1 in
10+
let prev2 = !last2 in
11+
last1 := !last2;
12+
last2 := (String.capitalize_ascii name) ^".x";
13+
T.f (name ^ ".ml") ~content:(Printf.sprintf "let x = %s + %s" prev1 prev2)
14+
)
15+
in
16+
let files = T.f "fib.ml" ~content:(Printf.sprintf "print_int %s" !last2) :: files in
17+
test "LongCommand"
18+
~options:[]
19+
~description:"Check that ocamlbuild can handle long commands"
20+
~tree:files
21+
~targets:("fib.byte",[]) ();;
322

423
let () = test "Preprocess"
524
~description:"Check that preprocessor works"

0 commit comments

Comments
 (0)