TestFile buildFile = testFile("build.gradle");
buildFile.writelns(
"// a comment",
"import org.gradle.unknown.Unknown",
"new Unknown()");
<BUG>GradleExecutionFailure failure = inTestDirectory().runTasksAndExpectFailure();
</BUG>
failure.assertHasFileName(String.format("Build file '%s'", buildFile));
failure.assertHasLineNumber(2);
failure.assertHasContext(String.format("Could not compile build file '%s'.", buildFile));

TestFile buildFile = testFile("build.gradle");
buildFile.writelns(
"// a comment",
"import org.gradle.unknown.Unknown",
"new Unknown()");
ExecutionFailure failure = inTestDirectory().runWithFailure();
failure.assertHasFileName(String.format("Build file '%s'", buildFile));
failure.assertHasLineNumber(2);
failure.assertHasContext(String.format("Could not compile build file '%s'.", buildFile));
