X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/658c8d8d96047c5ba77be4aecc2545a22d5e35b9..4e3303fa08e030722d6fd4d7fe7b8d44ef98991c:/tests/data/preview/long_strings.py?ds=sidebyside 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))