From d4d7fca411ab598918348da9a39241e3eeea58be Mon Sep 17 00:00:00 2001 From: Laurent Le Brun Date: Tue, 14 Feb 2017 19:12:02 +0000 Subject: BuildFileAST.eval() doesn't execute the code when there's a static error. This has no visible effect on Bazel (eval is used just for internal expressions that don't fail), and is therefore not tested. It will be tested when we add tests to the standalone Skylark interpreter. -- PiperOrigin-RevId: 147495990 MOS_MIGRATED_REVID=147495990 --- .../java/com/google/devtools/build/lib/syntax/EvaluationTest.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/test/java/com/google/devtools/build/lib/syntax/EvaluationTest.java') diff --git a/src/test/java/com/google/devtools/build/lib/syntax/EvaluationTest.java b/src/test/java/com/google/devtools/build/lib/syntax/EvaluationTest.java index db5d95cfe1..4a71755ab2 100644 --- a/src/test/java/com/google/devtools/build/lib/syntax/EvaluationTest.java +++ b/src/test/java/com/google/devtools/build/lib/syntax/EvaluationTest.java @@ -477,8 +477,9 @@ public class EvaluationTest extends EvaluationTestCase { @Test public void testListComprehensionModifiesGlobalEnv() throws Exception { - new SkylarkTest().update("x", 42).testIfErrorContains("ERROR 1:1: Variable x is read only", - "[x + 1 for x in [1,2,3]]"); + new SkylarkTest() + .update("x", 42) + .testIfErrorContains("Variable x is read only", "[x + 1 for x in [1,2,3]]"); new BuildTest().update("x", 42).setUp("y =[x + 1 for x in [1,2,3]]") .testExactOrder("y", 2, 3, 4).testLookup("x", 3); // (x is global) } -- cgit v1.2.3