-
Notifications
You must be signed in to change notification settings - Fork 82
Open
Description
Hello,
today testscript allows to require:
- success (exit status 0) with
exec foo - failure (exit status != 0) with
! exec foo.
Sometimes one would like to specify the exact exit status value. For example, if curl was written in Go, see section "EXIT CODES" of the curl man page.
I realized that a backward-compatible and clear way to express this would be to add an optional integer to the right of the ! symbol:
! exec fooas of today!<N> exec foo, where<N>is a non-zero, positive integer, to specify the exit status.- For example:
!2 exec foorequiresfooto exit with status 2.
- For example:
As usual, the proposed syntax is just a possibility, I care more about the feature itself.
Thanks for testscript!
esacteksab and Noxsios
Metadata
Metadata
Assignees
Labels
No labels