You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 foo as of today
!<N> exec foo, where <N> is a non-zero, positive integer, to specify the exit status.
For example: !2 exec foo requires foo to exit with status 2.
As usual, the proposed syntax is just a possibility, I care more about the feature itself.
Thanks for testscript!
The text was updated successfully, but these errors were encountered:
Hello,
today testscript allows to require:
exec foo
! 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 foo
as of today!<N> exec foo
, where<N>
is a non-zero, positive integer, to specify the exit status.!2 exec foo
requiresfoo
to exit with status 2.As usual, the proposed syntax is just a possibility, I care more about the feature itself.
Thanks for testscript!
The text was updated successfully, but these errors were encountered: