File tree Expand file tree Collapse file tree 3 files changed +17
-2
lines changed
c_formatter_42/formatters Expand file tree Collapse file tree 3 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -35,8 +35,8 @@ def preprocessor_directive(content: str) -> str:
3535 indent -= 1
3636
3737 # if newline doesn't follows preprocessor part, insert one
38- lastline_index = idented [- 1 ][0 ]
3938 try :
39+ lastline_index = idented [- 1 ][0 ]
4040 if lines [lastline_index + 1 ] != "" :
4141 lines .insert (lastline_index + 1 , "" )
4242 except IndexError :
Original file line number Diff line number Diff line change 11[metadata]
22name = c_formatter_42
3- version = 0.2.0
3+ version = 0.2.1
44description = formatting tool complient with 42 school' s norm
55long_description = file: README.md
66long_description_content_type = text/markdown
Original file line number Diff line number Diff line change @@ -53,3 +53,18 @@ def test_run_align_break_column_max():
5353
5454def test_run_func_decl_single_tab_and_global_aligned ():
5555 pass
56+
57+
58+ def test_basic ():
59+ input = """
60+ int main(int argc, char*argv[]){
61+ return 0;
62+ }
63+ """
64+ output = """
65+ int\t main(int argc, char *argv[])
66+ {
67+ return (0);
68+ }
69+ """
70+ assert output == run_all (input )
You can’t perform that action at this time.
0 commit comments