blob: a5b7e3f820e6aa76c226fec0c8cf930004a51e98 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
(* TEST
readonly_files = "puts.c";
use_runtime = "false";
unset FOO;
include unix;
hasunix;
setup-ocamlc.byte-build-env;
flags = "-w -a -output-complete-exe puts.c -ccopt -I${ocamlsrcdir}/runtime";
program = "test2";
ocamlc.byte;
program = "./test2";
run;
check-program-output;
*)
external puts: string -> unit = "caml_puts"
let _ = at_exit (fun () -> print_endline "Program terminated")
let () =
Unix.putenv "FOO" "Hello OCaml!";
puts (Unix.getenv "FOO")
|