trycmd
trycmd copied to clipboard
Is it possible to write a multiline file in `.trycmd` tests?
I'd like to be able to create multiline files from within the trycmd
blocks to serve as test fixtures. Is it possible?
I'm thinking something like this (pseudo code):
write todos.txt = """
- [x] Wash the dishes
- [ ] Mow lawn
"""
$ mytodos -f todos.txt
Mow lawn
Would be awesome if you could assign stdin like this too:
stdin = """
- [x] Wash the dishes
- [ ] Mow lawn
"""
$ mytodos -f -
Mow lawn
At this time, no.
We do support <stem>.in/
directories for runnin your trycmd files within. I'm a bit hesitant to add more complexity to the trycmd
file syntax and we'd need a good reason why .in/
directories wouldn't work
@epage totally makes sense. The *.in/
directories are working well.
And thank you for this amazing crate, it's making testing my cli a joy!