TestFile childBuildFile = testFile("child/build.gradle");
childBuildFile.writelns(
"def broken = { ->",
"    throw new RuntimeException('failure') }",
"broken()");
<BUG>GradleExecutionFailure failure = inTestDirectory().runTasksAndExpectFailure("t");
</BUG>
failure.assertHasFileName(String.format("Build file '%s'", childBuildFile));
failure.assertHasLineNumber(2);
failure.assertHasContext("A problem occurred evaluating project ':child'");

TestFile childBuildFile = testFile("child/build.gradle");
childBuildFile.writelns(
"def broken = { ->",
"    throw new RuntimeException('failure') }",
"broken()");
ExecutionFailure failure = inTestDirectory().withTasks("t").runWithFailure();
failure.assertHasFileName(String.format("Build file '%s'", childBuildFile));
failure.assertHasLineNumber(2);
failure.assertHasContext("A problem occurred evaluating project ':child'");
