| 40 columns | |
| ### Tests that nested collections force outer ones to split. |
| >>> Nested non-empty list forces outer list to split. |
| list = [[inner]]; |
| <<< |
| list = [ |
| [inner], |
| ]; |
| >>> Nested non-empty map forces outer list to split. |
| list = [{key: inner}]; |
| <<< |
| list = [ |
| {key: inner}, |
| ]; |
| >>> Nested non-empty set forces outer list to split. |
| list = [{inner}]; |
| <<< |
| list = [ |
| {inner}, |
| ]; |
| >>> Nested non-empty record does not force outer list to split. |
| list = [(inner,)]; |
| <<< |
| list = [(inner,)]; |
| >>> Nested empty collection does not force outer list to split. |
| list = [[], {}, ()]; |
| <<< |
| list = [[], {}, ()]; |
| >>> A spread list literal splits an outer list even if it fits. |
| list = [1, ...[2, 3], 4]; |
| <<< |
| list = [ |
| 1, |
| ...[2, 3], |
| 4, |
| ]; |
| >>> A spread empty list does not force outer split |
| list = [1, ...[], 4]; |
| <<< |
| list = [1, ...[], 4]; |
| >>> Indirect nesting still forces a split. |
| [function([inner])]; |
| <<< |
| [ |
| function([inner]), |
| ]; |
| >>> Multiple nested collections. |
| list = [first, [second, third, fourth], fifth, {sixth, seventh, eighth, nine, tenth, |
| eleventh}]; |
| <<< |
| list = [ |
| first, |
| [second, third, fourth], |
| fifth, |
| { |
| sixth, |
| seventh, |
| eighth, |
| nine, |
| tenth, |
| eleventh, |
| }, |
| ]; |
| >>> Deeply nested collections. |
| list = [[{[[argument, argument, argument, argument]]}]]; |
| <<< |
| list = [ |
| [ |
| { |
| [ |
| [ |
| argument, |
| argument, |
| argument, |
| argument, |
| ], |
| ], |
| }, |
| ], |
| ]; |