-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exit Code #2
Comments
Obviously there should be a way to test different possible exit codes in one test suite, as even one small program could have many. This means that it will be impossible to call code that uses The point of having all these Perhaps we can make an easy way to run a program itself as a test (say, running a script dynamically), or set up some conventions for dealing with these kinds of unrecoverable side effects. I think you're mixing up the subject of the test with the test itself. In the case of exit codes the test shouldn't use |
Uberi, rereading your issue again after aviaryan mentioned it made me realize I misunderstood it at first, almost 4 (_four_!) years ago. I originally thought that you were talking about giving a test suite the capability to test it's own use of exit codes, which seem to be rather problematic. (On second thought, perhaps an OnExit function could be used for this purpose.) Anyways, as far as a new response to your original issue: I agree in general, but since the testing context is not saved after the call to Test and the expected use case is to call on the object directly after creating it, perhaps the Test method should return an object that has the Edit: on second thought, what if the Test() method just returned the number of failed tests? Then you can do what you want with that including |
Has it really been that long? Feels like just a little while ago :) I admit, I haven't looked at a lot of this stuff for a while now, but a lot of GUIs still seem to use |
The test structure at the moment precludes the usage of exit codes. This is useful for things like Git hooks and the like.
Having exit codes means something else as well:
ExitApp, Code
must be used to complete the script. That means that there needs to be a post-completion method for when all the test suites given to Yunit have completed, maybeYunit.Complete()
, to run the exit routine. Thought about usingOnExit
, but the tests themselves might require it.The text was updated successfully, but these errors were encountered: