3 test_description
='git column'
4 TEST_PASSES_SANITIZE_LEAK
=true
7 test_expect_success
'setup' '
23 test_expect_success
'never' '
24 git column --indent=Z --mode=never <lista >actual &&
28 test_expect_success
'always' '
29 cat >expected <<\EOF &&
42 git column --indent=Z --mode=plain <lista >actual &&
43 test_cmp expected actual
46 test_expect_success
'--nl' '
47 cat >expected <<\EOF &&
60 git column --nl="Z$LF" --mode=plain <lista >actual &&
61 test_cmp expected actual
64 test_expect_success
'80 columns' '
65 cat >expected <<\EOF &&
66 one two three four five six seven eight nine ten eleven
68 COLUMNS=80 git column --mode=column <lista >actual &&
69 test_cmp expected actual
86 test_expect_success COLUMNS_CAN_BE_1
'COLUMNS = 1' '
87 COLUMNS=1 git column --mode=column <lista >actual &&
88 test_cmp expected actual
91 test_expect_success
'width = 1' '
92 git column --mode=column --width=1 <lista >actual &&
93 test_cmp expected actual
99 test_expect_success
'20 columns' '
100 cat >expected <<\EOF &&
108 git column --mode=column <lista >actual &&
109 test_cmp expected actual
112 test_expect_success
'20 columns, nodense' '
113 cat >expected <<\EOF &&
121 git column --mode=column,nodense < lista > actual &&
122 test_cmp expected actual
125 test_expect_success
'20 columns, dense' '
126 cat >expected <<\EOF &&
132 git column --mode=column,dense < lista > actual &&
133 test_cmp expected actual
136 test_expect_success
'20 columns, padding 2' '
137 cat >expected <<\EOF &&
145 git column --mode=column --padding 2 <lista >actual &&
146 test_cmp expected actual
149 test_expect_success
'20 columns, indented' '
150 cat >expected <<\EOF &&
158 git column --mode=column --indent=" " <lista >actual &&
159 test_cmp expected actual
162 test_expect_success
'20 columns, row first' '
163 cat >expected <<\EOF &&
171 git column --mode=row <lista >actual &&
172 test_cmp expected actual
175 test_expect_success
'20 columns, row first, nodense' '
176 cat >expected <<\EOF &&
184 git column --mode=row,nodense <lista >actual &&
185 test_cmp expected actual
188 test_expect_success
'20 columns, row first, dense' '
189 cat >expected <<\EOF &&
195 git column --mode=row,dense <lista >actual &&
196 test_cmp expected actual