]> git.madduck.net Git - etc/vim.git/blob - tests/data/cases/preview_cantfit.py

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Prepare release 23.10.0 (#3951)
[etc/vim.git] / tests / data / cases / preview_cantfit.py
1 # flags: --preview
2 # long variable name
3 this_is_a_ridiculously_long_name_and_nobody_in_their_right_mind_would_use_one_like_it = 0
4 this_is_a_ridiculously_long_name_and_nobody_in_their_right_mind_would_use_one_like_it = 1  # with a comment
5 this_is_a_ridiculously_long_name_and_nobody_in_their_right_mind_would_use_one_like_it = [
6     1, 2, 3
7 ]
8 this_is_a_ridiculously_long_name_and_nobody_in_their_right_mind_would_use_one_like_it = function()
9 this_is_a_ridiculously_long_name_and_nobody_in_their_right_mind_would_use_one_like_it = function(
10     arg1, arg2, arg3
11 )
12 this_is_a_ridiculously_long_name_and_nobody_in_their_right_mind_would_use_one_like_it = function(
13     [1, 2, 3], arg1, [1, 2, 3], arg2, [1, 2, 3], arg3
14 )
15 # long function name
16 normal_name = but_the_function_name_is_now_ridiculously_long_and_it_is_still_super_annoying()
17 normal_name = but_the_function_name_is_now_ridiculously_long_and_it_is_still_super_annoying(
18     arg1, arg2, arg3
19 )
20 normal_name = but_the_function_name_is_now_ridiculously_long_and_it_is_still_super_annoying(
21     [1, 2, 3], arg1, [1, 2, 3], arg2, [1, 2, 3], arg3
22 )
23 # long arguments
24 normal_name = normal_function_name(
25     "but with super long string arguments that on their own exceed the line limit so there's no way it can ever fit",
26     "eggs with spam and eggs and spam with eggs with spam and eggs and spam with eggs with spam and eggs and spam with eggs",
27     this_is_a_ridiculously_long_name_and_nobody_in_their_right_mind_would_use_one_like_it=0,
28 )
29 string_variable_name = (
30     "a string that is waaaaaaaayyyyyyyy too long, even in parens, there's nothing you can do"  # noqa
31 )
32 for key in """
33     hostname
34     port
35     username
36 """.split():
37     if key in self.connect_kwargs:
38         raise ValueError(err.format(key))
39 concatenated_strings = "some strings that are " "concatenated implicitly, so if you put them on separate " "lines it will fit"
40 del concatenated_strings, string_variable_name, normal_function_name, normal_name, need_more_to_make_the_line_long_enough
41
42
43 # output
44
45
46 # long variable name
47 this_is_a_ridiculously_long_name_and_nobody_in_their_right_mind_would_use_one_like_it = (
48     0
49 )
50 this_is_a_ridiculously_long_name_and_nobody_in_their_right_mind_would_use_one_like_it = (
51     1  # with a comment
52 )
53 this_is_a_ridiculously_long_name_and_nobody_in_their_right_mind_would_use_one_like_it = [
54     1,
55     2,
56     3,
57 ]
58 this_is_a_ridiculously_long_name_and_nobody_in_their_right_mind_would_use_one_like_it = (
59     function()
60 )
61 this_is_a_ridiculously_long_name_and_nobody_in_their_right_mind_would_use_one_like_it = function(
62     arg1, arg2, arg3
63 )
64 this_is_a_ridiculously_long_name_and_nobody_in_their_right_mind_would_use_one_like_it = function(
65     [1, 2, 3], arg1, [1, 2, 3], arg2, [1, 2, 3], arg3
66 )
67 # long function name
68 normal_name = (
69     but_the_function_name_is_now_ridiculously_long_and_it_is_still_super_annoying()
70 )
71 normal_name = (
72     but_the_function_name_is_now_ridiculously_long_and_it_is_still_super_annoying(
73         arg1, arg2, arg3
74     )
75 )
76 normal_name = (
77     but_the_function_name_is_now_ridiculously_long_and_it_is_still_super_annoying(
78         [1, 2, 3], arg1, [1, 2, 3], arg2, [1, 2, 3], arg3
79     )
80 )
81 # long arguments
82 normal_name = normal_function_name(
83     "but with super long string arguments that on their own exceed the line limit so"
84     " there's no way it can ever fit",
85     "eggs with spam and eggs and spam with eggs with spam and eggs and spam with eggs"
86     " with spam and eggs and spam with eggs",
87     this_is_a_ridiculously_long_name_and_nobody_in_their_right_mind_would_use_one_like_it=0,
88 )
89 string_variable_name = "a string that is waaaaaaaayyyyyyyy too long, even in parens, there's nothing you can do"  # noqa
90 for key in """
91     hostname
92     port
93     username
94 """.split():
95     if key in self.connect_kwargs:
96         raise ValueError(err.format(key))
97 concatenated_strings = (
98     "some strings that are "
99     "concatenated implicitly, so if you put them on separate "
100     "lines it will fit"
101 )
102 del (
103     concatenated_strings,
104     string_variable_name,
105     normal_function_name,
106     normal_name,
107     need_more_to_make_the_line_long_enough,
108 )