@@ -350,6 +350,15 @@ Describe filetype indent
350350 Assert Equals(Insert(in), Buffer(out))
351351 End
352352 End
353+
354+ It indents the await expression
355+ let in = "await spam \\\<CR>.eggs()"
356+ let out = [
357+ \ 'await spam \',
358+ \ ' .eggs()',
359+ \]
360+ Assert Equals(Insert(in), Buffer(out))
361+ End
353362 End
354363
355364 Describe simple statement
@@ -1089,5 +1098,47 @@ Describe filetype indent
10891098 Assert Equals(Insert(in), Buffer(out))
10901099 End
10911100 End
1101+
1102+ Describe coroutine
1103+ Describe coroutine function definition
1104+ It aligns with left brackets
1105+ let in = "async def spam(*args,\<CR>**kwargs):"
1106+ let out = [
1107+ \ 'async def spam(*args,',
1108+ \ ' **kwargs):',
1109+ \]
1110+ Assert Equals(Insert(in), Buffer(out))
1111+ End
1112+
1113+ It increases the indent level (hanging indent)
1114+ let in = "async def spam(\<CR>*args,\<CR>**kwargs\<CR>):"
1115+ let out = [
1116+ \ 'async def spam(',
1117+ \ ' *args,',
1118+ \ ' **kwargs',
1119+ \ '):',
1120+ \]
1121+ Assert Equals(Insert(in), Buffer(out))
1122+ End
1123+
1124+ It increases the indent level (line continueation)
1125+ let in = "async def \\\<CR>spam():\<CR>...\<CR>"
1126+ let in .= "async \\\<CR>def eggs():\<CR>...\<CR>"
1127+ let in .= "async \\\<CR>def \\\<CR>ham():"
1128+ let out = [
1129+ \ 'async def \',
1130+ \ ' spam():',
1131+ \ ' ...',
1132+ \ 'async \',
1133+ \ ' def eggs():',
1134+ \ ' ...',
1135+ \ 'async \',
1136+ \ ' def \',
1137+ \ ' ham():',
1138+ \]
1139+ Assert Equals(Insert(in), Buffer(out))
1140+ End
1141+ End
1142+ End
10921143 End
10931144End
0 commit comments