aboutsummaryrefslogtreecommitdiffstats
path: root/tests/indent
diff options
context:
space:
mode:
Diffstat (limited to 'tests/indent')
-rw-r--r--tests/indent/python/break_continue.py9
-rw-r--r--tests/indent/python_spec.lua2
2 files changed, 11 insertions, 0 deletions
diff --git a/tests/indent/python/break_continue.py b/tests/indent/python/break_continue.py
new file mode 100644
index 000000000..aabd677f8
--- /dev/null
+++ b/tests/indent/python/break_continue.py
@@ -0,0 +1,9 @@
+def f():
+ for x in range(1, 2):
+ if x == 1:
+ break
+
+def f():
+ for x in range(1, 2):
+ if x == 1:
+ continue
diff --git a/tests/indent/python_spec.lua b/tests/indent/python_spec.lua
index 2b52d4597..aa9aa83e0 100644
--- a/tests/indent/python_spec.lua
+++ b/tests/indent/python_spec.lua
@@ -88,6 +88,8 @@ describe("indent Python:", function()
run:new_line("match_case.py", { on_line = 5, text = "pass", indent = 12 })
run:new_line("match_case.py", { on_line = 10, text = "pass", indent = 8 })
run:new_line("match_case.py", { on_line = 15, text = "pass", indent = 12 })
+ run:new_line("break_continue.py", { on_line = 4, text = "pass", indent = 8 })
+ run:new_line("break_continue.py", { on_line = 9, text = "pass", indent = 8 })
for _, line in ipairs { 2, 5, 8, 11, 16, 21, 24, 27, 34, 39 } do
run:new_line("return_dedent.py", { on_line = line, text = "x", indent = 0 })