Remove flag `--incompatible_string_is_not_iterable`
https://github.com/bazelbuild/bazel/issues/5830
RELNOTES: None.
PiperOrigin-RevId: 234784611
diff --git a/src/test/java/com/google/devtools/build/lib/syntax/SkylarkEvaluationTest.java b/src/test/java/com/google/devtools/build/lib/syntax/SkylarkEvaluationTest.java
index 3d89729..2ef84a6 100644
--- a/src/test/java/com/google/devtools/build/lib/syntax/SkylarkEvaluationTest.java
+++ b/src/test/java/com/google/devtools/build/lib/syntax/SkylarkEvaluationTest.java
@@ -688,19 +688,6 @@
}
@Test
- public void testForOnString() throws Exception {
- new SkylarkTest("--incompatible_string_is_not_iterable=false")
- .setUp(
- "def foo():",
- " s = []",
- " for i in 'abc':",
- " s = s + [i]",
- " return s",
- "s = foo()")
- .testExactOrder("s", "a", "b", "c");
- }
-
- @Test
public void testForAssignmentList() throws Exception {
new SkylarkTest().setUp("def foo():",
" d = ['a', 'b', 'c']",
@@ -841,6 +828,14 @@
}
@Test
+ public void testForStringNotIterable() throws Exception {
+ new SkylarkTest()
+ .update("mock", new Mock())
+ .testIfErrorContains(
+ "type 'string' is not iterable", "def func():", " for i in 'abc': a = i", "func()\n");
+ }
+
+ @Test
public void testForOnDictionary() throws Exception {
new SkylarkTest().setUp("def foo():",
" d = {1: 'a', 2: 'b', 3: 'c'}",