@@ -1208,6 +1208,58 @@ Describe filetype indent
12081208 Assert Equals(Insert(in), Buffer(out))
12091209 End
12101210 End
1211+
1212+ Describe async with statement
1213+ It aligns with left brackets
1214+ let in = "async with (spam,\<CR>eggs):"
1215+ let out = [
1216+ \ 'async with (spam,',
1217+ \ ' eggs):',
1218+ \] "" Assert Equals(Insert(in), Buffer(out))
1219+ End
1220+
1221+ It increases the indent level by 2
1222+ let b:python_indent_multiline_statement = 1
1223+ let in = "async with (spam,\<CR>eggs):"
1224+ let out = [
1225+ \ 'async with (spam,',
1226+ \ ' eggs):',
1227+ \]
1228+ Assert Equals(Insert(in), Buffer(out))
1229+ End
1230+
1231+ It increases the indent level (hanging indent)
1232+ let in = "async with (\<CR>spam,\<CR>eggs,\<CR>):"
1233+ let out = [
1234+ \ 'async with (',
1235+ \ ' spam,',
1236+ \ ' eggs,',
1237+ \ '):',
1238+ \]
1239+ Assert Equals(Insert(in), Buffer(out))
1240+ End
1241+
1242+ It increases the indent level by 2 (hanging indent)
1243+ let b:python_indent_multiline_statement = 1
1244+ let in = "async with (\<CR>spam,\<CR>eggs,\<CR>):"
1245+ let out = [
1246+ \ 'async with (',
1247+ \ ' spam,',
1248+ \ ' eggs,',
1249+ \ '):',
1250+ \]
1251+ Assert Equals(Insert(in), Buffer(out))
1252+ End
1253+
1254+ It increases the indent level (line continueation)
1255+ let in = "async with spam, \\\<CR>eggs:"
1256+ let out = [
1257+ \ 'async with spam, \',
1258+ \ ' eggs:',
1259+ \]
1260+ Assert Equals(Insert(in), Buffer(out))
1261+ End
1262+ End
12111263 End
12121264 End
12131265End
0 commit comments