Quantcast
Channel: OCaml - Topics tagged dune
Viewing all articles
Browse latest Browse all 520

Redirect stdin from a file in a dune custom test

$
0
0

@ifazk wrote:

I’m trying to write a custom test where I feed some test data to the main executable of my project via standard in. Is there a way to do this?

Here’s what I have so far.

(alias
 (name runtest)
 (deps test_data.txt)
 (action (run dune exec my_proj_exe < test.txt))
)

I don’t think the redirect actually works, since the test hangs. I think < is treated as an argument to dune.

Posts: 6

Participants: 4

Read full topic


Viewing all articles
Browse latest Browse all 520

Trending Articles