Skip to content

Commit

Permalink
Get MDX tests working on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
polytypic committed Oct 9, 2023
1 parent 23a1a84 commit acb2ad5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -752,12 +752,17 @@ Eio.Io Net Connection_failure Refused Unix_error (Connection refused, "connect",
```

If we ran this using another backend, the `Unix_error` part might change.
To avoid this problem, you can use `Eio.Exn.Backend.show` to hide the backend-specific part of errors:
To avoid this problem, you can use `Eio.Exn.Backend.show`

```ocaml
# Eio.Exn.Backend.show := false;;
- : unit = ()
```

to hide the backend-specific part of errors:

<!-- $MDX skip -->
```ocaml
# Eio_main.run @@ fun env ->
let net = Eio.Stdenv.net env in
Switch.run @@ fun sw ->
Expand Down Expand Up @@ -892,6 +897,7 @@ perhaps with `open_dir` to constrain all access to be within that directory.

Spawning a child process can be done using the [Eio.Process][] module:

<!-- $MDX non-deterministic=command -->
```ocaml
# Eio_main.run @@ fun env ->
let proc_mgr = Eio.Stdenv.process_mgr env in
Expand All @@ -903,6 +909,7 @@ hello
There are various optional arguments for setting the process's current directory or connecting up the standard streams.
For example, we can use `tr` to convert some text to upper-case:

<!-- $MDX non-deterministic=command -->
```ocaml
# Eio_main.run @@ fun env ->
let proc_mgr = Eio.Stdenv.process_mgr env in
Expand All @@ -915,6 +922,7 @@ ONE TWO THREE
If you want to capture the output of a process, you can provide a suitable `Eio.Flow.sink` as the `stdout` argument,
or use the `parse_out` convenience wrapper:

<!-- $MDX non-deterministic=command -->
```ocaml
# Eio_main.run @@ fun env ->
let proc_mgr = Eio.Stdenv.process_mgr env in
Expand All @@ -924,6 +932,7 @@ or use the `parse_out` convenience wrapper:

All process functions either return the exit status or check that it was zero (success):

<!-- $MDX non-deterministic=command -->
```ocaml
# Eio_main.run @@ fun env ->
let proc_mgr = Eio.Stdenv.process_mgr env in
Expand Down
1 change: 0 additions & 1 deletion dune
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@
(package eio_main)
(deps (package eio_main) (package kcas) (env_var "EIO_BACKEND"))
(preludes doc/prelude.ml)
(enabled_if (<> %{os_type} "Win32"))
(files README.md))

0 comments on commit acb2ad5

Please sign in to comment.