diff --git a/c_formatter_42/data/.clang-format b/c_formatter_42/data/.clang-format index 4abcb0a..d05f774 100644 --- a/c_formatter_42/data/.clang-format +++ b/c_formatter_42/data/.clang-format @@ -92,7 +92,7 @@ BreakBeforeTernaryOperators: true # ColumnLimit (unsigned) # The column limit. -ColumnLimit: 0 +ColumnLimit: 1024 # FixNamespaceComments (bool) diff --git a/tests/test_run.py b/tests/test_run.py index cb47b03..e3381f5 100644 --- a/tests/test_run.py +++ b/tests/test_run.py @@ -55,6 +55,20 @@ def test_run_func_decl_single_tab_and_global_aligned(): pass +def test_run_long_aligned_func_decl(): + # This function declaration is already aligned and should not be modified + input = """ +typedef struct s_foo +{ +\tlong int\tbar; +}\t\t\t\tt_foo; + +long int\t\tfoooooooooooooooooooooooooooooo(t_foo *foooooooo1, +\t\t\t\t\tt_foo *foooooooo2, int barrrrrrrr1, int barrrrrrrr2); +""" + assert input == run_all(input) + + def test_basic(): input = """ int main(int argc, char*argv[]){