134
}
135
'
136
137
+test_expect_success TTY 'git tag -l defaults to not paging' '
138
+ rm -f paginated.out &&
139
+ test_terminal git tag -l &&
140
+ ! test -e paginated.out
141
+'
142
+
143
+test_expect_success TTY 'git tag -l respects pager.tag' '
144
+ rm -f paginated.out &&
145
+ test_terminal git -c pager.tag tag -l &&
146
+ test -e paginated.out
147
+'
148
+
149
+test_expect_success TTY 'git tag -l respects --no-pager' '
150
+ rm -f paginated.out &&
151
+ test_terminal git -c pager.tag --no-pager tag -l &&
152
+ ! test -e paginated.out
153
+'
154
+
155
+test_expect_success TTY 'git tag with no args defaults to not paging' '
156
+ # no args implies -l so this should page like -l
157
+ rm -f paginated.out &&
158
+ test_terminal git tag &&
159
+ ! test -e paginated.out
160
+'
161
+
162
+test_expect_success TTY 'git tag with no args respects pager.tag' '
163
+ # no args implies -l so this should page like -l
164
+ rm -f paginated.out &&
165
+ test_terminal git -c pager.tag tag &&
166
+ test -e paginated.out
167
+'
168
+
169
+test_expect_success TTY 'git tag --contains defaults to not paging' '
170
+ # --contains implies -l so this should page like -l
171
+ rm -f paginated.out &&
172
+ test_terminal git tag --contains &&
173
+ ! test -e paginated.out
174
+'
175
+
176
+test_expect_success TTY 'git tag --contains respects pager.tag' '
177
+ # --contains implies -l so this should page like -l
178
+ rm -f paginated.out &&
179
+ test_terminal git -c pager.tag tag --contains &&
180
+ test -e paginated.out
181
+'
182
+
183
+test_expect_success TTY 'git tag -a defaults to not paging' '
184
+ test_when_finished "git tag -d newtag" &&
185
+ rm -f paginated.out &&
186
+ test_terminal git tag -am message newtag &&
187
+ ! test -e paginated.out
188
+'
189
+
190
+test_expect_failure TTY 'git tag -a ignores pager.tag' '
191
+ test_when_finished "git tag -d newtag" &&
192
+ rm -f paginated.out &&
193
+ test_terminal git -c pager.tag tag -am message newtag &&
194
+ ! test -e paginated.out
195
+'
196
+
197
+test_expect_success TTY 'git tag -a respects --paginate' '
198
+ test_when_finished "git tag -d newtag" &&
199
+ rm -f paginated.out &&
200
+ test_terminal git --paginate tag -am message newtag &&
201
+ test -e paginated.out
202
+'
203
+
204
# A colored commit log will begin with an appropriate ANSI escape
205
# for the first color; the text "commit" comes later.
206
colorful() {