summaryrefslogtreecommitdiff
path: root/testsuite/tests/output-complete-obj/test2.ml
blob: c201224ce8ca0ed9af7df9903407bd0e3c66e6ec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
(* TEST

readonly_files = "puts.c"
use_runtime = "false"
unset FOO

* hasunix
include unix
** setup-ocamlc.byte-build-env
*** ocamlc.byte
flags = "-w -a -output-complete-exe puts.c -ccopt -I${ocamlsrcdir}/runtime"
program = "test2"
**** run
program = "./test2"
***** 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")