grails/grails-core — pull request #538 by steintore (2014-09-09 18:22:23+00:00)
Title: GRAILS-6713 exit with exit code 1 if script is not found

The change contains no tests, as we were not sure how to test this properly.
One possibility is to write a test in GrailsBuildHelperTests, but these tests only use mock-classes, and not the main method in GrailsScriptRunner.
Another way of testing it is to use AbstractCliTestCase in a separate Grails-project, as we have done manually.

The test would look something like this:
````
class RunMissingScriptTests extends AbstractCliTestCase {

void testMissingScriptShouldFailWithExitCode(){
execute (['missingscript', '-non-interactive'])
assert waitForProcess() == 1
}

}
````

Contribution from Hackergarten Oslo 2014