Allow the command to be preceded by an exclamation point, which changes
the default expected result to a clean exit with a non-zero exit code.
MFC after: 1 week
Differential D58099
atf-check: Add shortcut for not-exit:0 Authored by des on Wed, Jul 8, 7:17 AM.
Details
Allow the command to be preceded by an exclamation point, which changes MFC after: 1 week
Diff Detail
Event TimelineComment Actions This is a really nice, simple feature request -- I love it! The concern I have about this change is that ! is a shell builtin operator and this could cause confusion/result in bugs if someone tries to fun the command on the command line in certain shells where ! has special meanings in different contexts (we can't always assume atf-sh is running /bin/sh, unfortunately..). How about atf_check -s '!0' false instead? If things were done that way the negation operator could be extended to -e and -o without any sort of ambiguity/confusion. Comment Actions Can you provide an example?
No, that completely negates the point of the patch. |