diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/test/java/com/google/devtools/build/lib/syntax/MethodLibraryTest.java | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/syntax/MethodLibraryTest.java b/src/test/java/com/google/devtools/build/lib/syntax/MethodLibraryTest.java index 67f691e4cd..081f1ad478 100644 --- a/src/test/java/com/google/devtools/build/lib/syntax/MethodLibraryTest.java +++ b/src/test/java/com/google/devtools/build/lib/syntax/MethodLibraryTest.java @@ -392,6 +392,25 @@ public class MethodLibraryTest extends EvaluationTestCase { } @Test + public void testStackTraceWithAugmentedAssignment() throws Exception { + new SkylarkTest() + .testIfErrorContains( + "File \"\", line 4" + + LINE_SEPARATOR + + "\t\tfoo()" + + LINE_SEPARATOR + + "\tFile \"\", line 3, in foo" + + LINE_SEPARATOR + + "\t\ts += \"2\"" + + LINE_SEPARATOR + + "unsupported operand type(s) for +: 'int' and 'string'", + "def foo():", + " s = 1", + " s += '2'", + "foo()"); + } + + @Test public void testStackTraceSkipBuiltInOnly() throws Exception { // The error message should not include the stack trace when there is // only one built-in function. |