@@ -19,6 +19,24 @@ def test_line_indent_depth_basic_3():
19
19
"""
20
20
assert 4 == indent_level (input )
21
21
22
+ def test_line_indent_depth_basic_4 ():
23
+ input = """\
24
+ static\t int\t \t test();
25
+ """
26
+ assert 4 == indent_level (input )
27
+
28
+ def test_line_indent_depth_basic_5 ():
29
+ input = """\
30
+ static void\t st_merge_fields_in_curr(char *strs[3], t_tok_lst **curr, t_tok_lst *fields);
31
+ """
32
+ assert 3 == indent_level (input )
33
+
34
+ def test_additional_indent_level_1 ():
35
+ input = """\
36
+ static void\t st_merge_fields_in_curr(char *strs[3], t_tok_lst **curr, t_tok_lst *fields);
37
+ """
38
+ assert 1 == additional_indent_level (input )
39
+
22
40
23
41
def test_insert_line_break_basic_1 ():
24
42
output = """\
@@ -40,8 +58,8 @@ def test_insert_line_break_basic_2():
40
58
def test_insert_line_break_basic_3 ():
41
59
output = """\
42
60
\t \t \t \t return (fooooooooooooooooooooooooo(a, b, cccccccccccc,
43
- \t \t \t \t \t \t \ t ddddddddddddd, eeeeeeeeeeeeeeee, fffffffffffffff,
44
- \t \t \t \t \t \t \ t gggggggggggg, hhhhhhhhhhhhhhhhhh));
61
+ \t \t \t \t \t \t ddddddddddddd, eeeeeeeeeeeeeeee, fffffffffffffff,
62
+ \t \t \t \t \t \t gggggggggggg, hhhhhhhhhhhhhhhhhh));
45
63
"""
46
64
assert output == line_breaker ("""\
47
65
\t \t \t \t return (fooooooooooooooooooooooooo(a, b, cccccccccccc, ddddddddddddd, eeeeeeeeeeeeeeee, fffffffffffffff, gggggggggggg, hhhhhhhhhhhhhhhhhh));
@@ -158,11 +176,11 @@ def test_insert_line_break_basic_23():
158
176
159
177
def test_insert_line_break_long_function_declaration ():
160
178
input = """
161
- static void\t st_merge_fields_in_curr(char *strs[3], t_tok_lst **curr, t_tok_lst *fields)
179
+ static void\t st_merge_fields_in_curr(char *strs[3], t_tok_lst **curr, t_tok_lst *fields);
162
180
"""
163
181
output = """
164
182
static void\t st_merge_fields_in_curr(char *strs[3], t_tok_lst **curr,
165
- \t \t t_tok_lst *fields)
183
+ \t \t \t \ t t_tok_lst *fields);
166
184
"""
167
185
assert line_breaker (input ) == output
168
186
0 commit comments