mte/unikernel/duniverse/dune_/test/expect-tests/process_tests.ml

33 lines
839 B
OCaml
Raw Normal View History

2025-11-11 02:07:51 +01:00
open Stdune
open! Dune_tests_common
open Dune_engine
let go =
let config =
Clflags.display := Short;
{ Scheduler.Config.concurrency = 1
; stats = None
; print_ctrl_c_warning = true
; watch_exclusions = []
}
in
Scheduler.Run.go config ~file_watcher:No_watcher ~on_event:(fun _ _ -> ())
;;
let true_ = Bin.which "true" ~path:(Env_path.path Env.initial) |> Option.value_exn
let%expect_test "null input" =
let stdin_from = Process.(Io.null In) in
let run () = Process.run ~display:Quiet ~stdin_from Strict true_ [] in
let _res = go run in
[%expect {||}]
;;
let%expect_test "null output" =
let stdout_to = Process.(Io.null Out) in
let stderr_to = Process.(Io.null Out) in
let run () = Process.run ~display:Quiet ~stdout_to ~stderr_to Strict true_ [] in
let _res = go run in
[%expect {||}]
;;