X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/658c8d8d96047c5ba77be4aecc2545a22d5e35b9..37542e64855ce21bd580f973ae5ce1ed86812a7a:/tests/data/preview/long_strings.py?ds=inline diff --git a/tests/data/preview/long_strings.py b/tests/data/preview/long_strings.py index 9c78f67..b7a0a42 100644 --- a/tests/data/preview/long_strings.py +++ b/tests/data/preview/long_strings.py @@ -287,6 +287,23 @@ dict_with_lambda_values = { ), } +# Complex string concatenations with a method call in the middle. +code = ( + (" return [\n") + + ( + ", \n".join( + " (%r, self.%s, visitor.%s)" + % (attrname, attrname, visit_name) + for attrname, visit_name in names + ) + ) + + ("\n ]\n") +) + + +# Test case of an outer string' parens enclose an inner string's parens. +call(body=("%s %s" % ((",".join(items)), suffix))) + # output @@ -828,3 +845,17 @@ dict_with_lambda_values = { f"{some_function_call(j.right)})" ), } + +# Complex string concatenations with a method call in the middle. +code = ( + " return [\n" + + ", \n".join( + " (%r, self.%s, visitor.%s)" % (attrname, attrname, visit_name) + for attrname, visit_name in names + ) + + "\n ]\n" +) + + +# Test case of an outer string' parens enclose an inner string's parens. +call(body="%s %s" % (",".join(items), suffix))