| 40 columns | |
| ### Test multiline strings as block arguments. |
| >>> Allow block formatting a multiline string. |
| someMethod("""first line fits in here |
| more stuff down here too that is long |
| """); |
| <<< |
| someMethod("""first line fits in here |
| more stuff down here too that is long |
| """); |
| >>> |
| someMethod('''first line fits in here |
| more stuff down here too that is long |
| '''); |
| <<< |
| someMethod('''first line fits in here |
| more stuff down here too that is long |
| '''); |
| >>> Allow block formatting a multiline string with interpolation. |
| someMethod("""first line fits in here |
| more stuff $down here too that is long |
| """); |
| <<< |
| someMethod("""first line fits in here |
| more stuff $down here too that is long |
| """); |
| >>> |
| someMethod('''first line fits in here |
| more stuff ${down + here} that is long |
| '''); |
| <<< |
| someMethod('''first line fits in here |
| more stuff ${down + here} that is long |
| '''); |
| >>> Don't block format if first line doesn't fit. |
| someMethod("""first line does not fit here |
| """); |
| <<< |
| someMethod( |
| """first line does not fit here |
| """, |
| ); |
| >>> Block format multiline string with non-block arguments before. |
| someMethod("foo", "bar", """ |
| some |
| text |
| """); |
| <<< |
| someMethod("foo", "bar", """ |
| some |
| text |
| """); |
| >>> Block format multiline string with one argument after. |
| someMethod(""" |
| some |
| text |
| """, "foo"); |
| <<< |
| someMethod(""" |
| some |
| text |
| """, "foo"); |
| >>> Don't block format multiline string with multiple arguments after. |
| someMethod(""" |
| some |
| text |
| """, "foo", "bar"); |
| <<< |
| someMethod( |
| """ |
| some |
| text |
| """, |
| "foo", |
| "bar", |
| ); |
| >>> Block format multiline string with non-block arguments before and after. |
| someMethod("foo", """ |
| some |
| text |
| """, |
| "bar"); |
| <<< |
| someMethod("foo", """ |
| some |
| text |
| """, "bar"); |
| >>> Can't have multiple block formatted multiline strings. |
| someMethod(""" |
| some |
| text |
| """, """ |
| some |
| more |
| """, """ |
| even more |
| """); |
| <<< |
| someMethod( |
| """ |
| some |
| text |
| """, |
| """ |
| some |
| more |
| """, |
| """ |
| even more |
| """, |
| ); |