Blame


1 af21bb7e 2023-04-12 mark #!/bin/sh
2 af21bb7e 2023-04-12 mark #
3 af21bb7e 2023-04-12 mark # Copyright (c) 2023 Mark Jamsek <mark@jamsek.dev>
4 af21bb7e 2023-04-12 mark #
5 af21bb7e 2023-04-12 mark # Permission to use, copy, modify, and distribute this software for any
6 af21bb7e 2023-04-12 mark # purpose with or without fee is hereby granted, provided that the above
7 af21bb7e 2023-04-12 mark # copyright notice and this permission notice appear in all copies.
8 af21bb7e 2023-04-12 mark #
9 af21bb7e 2023-04-12 mark # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 af21bb7e 2023-04-12 mark # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 af21bb7e 2023-04-12 mark # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 af21bb7e 2023-04-12 mark # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 af21bb7e 2023-04-12 mark # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 af21bb7e 2023-04-12 mark # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 af21bb7e 2023-04-12 mark # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 af21bb7e 2023-04-12 mark
17 af21bb7e 2023-04-12 mark . ./common.sh
18 af21bb7e 2023-04-12 mark
19 af21bb7e 2023-04-12 mark test_log_hsplit_diff()
20 af21bb7e 2023-04-12 mark {
21 af21bb7e 2023-04-12 mark test_init log_hsplit_diff
22 af21bb7e 2023-04-12 mark
23 af21bb7e 2023-04-12 mark local head_id=`git_show_head $testroot/repo`
24 af21bb7e 2023-04-12 mark local author_time=`git_show_author_time $testroot/repo`
25 af21bb7e 2023-04-12 mark local date=`date -u -r $author_time +"%a %b %e %X %Y UTC"`
26 283939fb 2024-04-23 op local ymd=`date -u -r $author_time +"%F"`
27 af21bb7e 2023-04-12 mark
28 5bde4759 2023-04-15 mark cat <<EOF >$TOG_TEST_SCRIPT
29 af21bb7e 2023-04-12 mark KEY_ENTER open diff view of selected commit
30 af21bb7e 2023-04-12 mark S toggle horizontal split
31 af21bb7e 2023-04-12 mark SCREENDUMP
32 af21bb7e 2023-04-12 mark EOF
33 af21bb7e 2023-04-12 mark
34 af21bb7e 2023-04-12 mark cat <<EOF >$testroot/view.expected
35 af21bb7e 2023-04-12 mark commit $head_id [1/1] master
36 689555c9 2023-05-15 stsp $ymd flan_hacker [master] adding the test tree
37 af21bb7e 2023-04-12 mark
38 af21bb7e 2023-04-12 mark
39 af21bb7e 2023-04-12 mark
40 af21bb7e 2023-04-12 mark
41 af21bb7e 2023-04-12 mark --------------------------------------------------------------------------------
42 af21bb7e 2023-04-12 mark [1/40] diff /dev/null $head_id
43 af21bb7e 2023-04-12 mark commit $head_id (master)
44 af21bb7e 2023-04-12 mark from: Flan Hacker <flan_hacker@openbsd.org>
45 af21bb7e 2023-04-12 mark date: $date
46 af21bb7e 2023-04-12 mark
47 af21bb7e 2023-04-12 mark adding the test tree
48 af21bb7e 2023-04-12 mark
49 af21bb7e 2023-04-12 mark A alpha | 1+ 0-
50 af21bb7e 2023-04-12 mark A beta | 1+ 0-
51 af21bb7e 2023-04-12 mark A epsilon/zeta | 1+ 0-
52 af21bb7e 2023-04-12 mark A gamma/delta | 1+ 0-
53 af21bb7e 2023-04-12 mark
54 af21bb7e 2023-04-12 mark 4 files changed, 4 insertions(+), 0 deletions(-)
55 af21bb7e 2023-04-12 mark
56 af21bb7e 2023-04-12 mark commit - /dev/null
57 af21bb7e 2023-04-12 mark commit + $head_id
58 af21bb7e 2023-04-12 mark blob - /dev/null
59 af21bb7e 2023-04-12 mark EOF
60 af21bb7e 2023-04-12 mark
61 af21bb7e 2023-04-12 mark cd $testroot/repo && tog log
62 af21bb7e 2023-04-12 mark cmp -s $testroot/view.expected $testroot/view
63 af21bb7e 2023-04-12 mark ret=$?
64 af21bb7e 2023-04-12 mark if [ $ret -ne 0 ]; then
65 af21bb7e 2023-04-12 mark diff -u $testroot/view.expected $testroot/view
66 af21bb7e 2023-04-12 mark test_done "$testroot" "$ret"
67 af21bb7e 2023-04-12 mark return 1
68 af21bb7e 2023-04-12 mark fi
69 af21bb7e 2023-04-12 mark
70 af21bb7e 2023-04-12 mark test_done "$testroot" "$ret"
71 af21bb7e 2023-04-12 mark }
72 af21bb7e 2023-04-12 mark
73 af21bb7e 2023-04-12 mark test_log_vsplit_diff()
74 af21bb7e 2023-04-12 mark {
75 af21bb7e 2023-04-12 mark # make screen wide enough for vsplit
76 af21bb7e 2023-04-12 mark test_init log_vsplit_diff 142
77 af21bb7e 2023-04-12 mark
78 af21bb7e 2023-04-12 mark local head_id=`git_show_head $testroot/repo`
79 af21bb7e 2023-04-12 mark local author_time=`git_show_author_time $testroot/repo`
80 af21bb7e 2023-04-12 mark local date=`date -u -r $author_time +"%a %b %e %X %Y UTC"`
81 283939fb 2024-04-23 op local ymd=`date -u -r $author_time +"%F"`
82 af21bb7e 2023-04-12 mark local blobid_alpha=`get_blob_id $testroot/repo "" alpha`
83 af21bb7e 2023-04-12 mark local blobid_beta=`get_blob_id $testroot/repo "" beta`
84 af21bb7e 2023-04-12 mark
85 5bde4759 2023-04-15 mark cat <<EOF >$TOG_TEST_SCRIPT
86 af21bb7e 2023-04-12 mark KEY_ENTER open diff view of selected commit in vertical split
87 af21bb7e 2023-04-12 mark SCREENDUMP
88 af21bb7e 2023-04-12 mark EOF
89 af21bb7e 2023-04-12 mark
90 af21bb7e 2023-04-12 mark cat <<EOF >$testroot/view.expected
91 af21bb7e 2023-04-12 mark commit $head_id [1/1] master |[1/40] diff /dev/null $head_id
92 689555c9 2023-05-15 stsp $ymd flan_hacker [master] adding the test tree |commit $head_id (master)
93 af21bb7e 2023-04-12 mark |from: Flan Hacker <flan_hacker@openbsd.org>
94 af21bb7e 2023-04-12 mark |date: $date
95 af21bb7e 2023-04-12 mark |
96 af21bb7e 2023-04-12 mark |adding the test tree
97 af21bb7e 2023-04-12 mark |
98 af21bb7e 2023-04-12 mark |A alpha | 1+ 0-
99 af21bb7e 2023-04-12 mark |A beta | 1+ 0-
100 af21bb7e 2023-04-12 mark |A epsilon/zeta | 1+ 0-
101 af21bb7e 2023-04-12 mark |A gamma/delta | 1+ 0-
102 af21bb7e 2023-04-12 mark |
103 af21bb7e 2023-04-12 mark |4 files changed, 4 insertions(+), 0 deletions(-)
104 af21bb7e 2023-04-12 mark |
105 af21bb7e 2023-04-12 mark |commit - /dev/null
106 af21bb7e 2023-04-12 mark |commit + $head_id
107 af21bb7e 2023-04-12 mark |blob - /dev/null
108 af21bb7e 2023-04-12 mark |blob + $blobid_alpha (mode 644)
109 af21bb7e 2023-04-12 mark |--- /dev/null
110 af21bb7e 2023-04-12 mark |+++ alpha
111 af21bb7e 2023-04-12 mark |@@ -0,0 +1 @@
112 af21bb7e 2023-04-12 mark |+alpha
113 af21bb7e 2023-04-12 mark |blob - /dev/null
114 af21bb7e 2023-04-12 mark |blob + $blobid_beta (mode 644)
115 af21bb7e 2023-04-12 mark EOF
116 af21bb7e 2023-04-12 mark
117 af21bb7e 2023-04-12 mark cd $testroot/repo && tog log
118 af21bb7e 2023-04-12 mark cmp -s $testroot/view.expected $testroot/view
119 af21bb7e 2023-04-12 mark ret=$?
120 af21bb7e 2023-04-12 mark if [ $ret -ne 0 ]; then
121 af21bb7e 2023-04-12 mark diff -u $testroot/view.expected $testroot/view
122 af21bb7e 2023-04-12 mark test_done "$testroot" "$ret"
123 af21bb7e 2023-04-12 mark return 1
124 af21bb7e 2023-04-12 mark fi
125 af21bb7e 2023-04-12 mark
126 af21bb7e 2023-04-12 mark test_done "$testroot" "$ret"
127 af21bb7e 2023-04-12 mark }
128 af21bb7e 2023-04-12 mark
129 af21bb7e 2023-04-12 mark test_log_show_author()
130 af21bb7e 2023-04-12 mark {
131 af21bb7e 2023-04-12 mark # make view wide enough to show id
132 af21bb7e 2023-04-12 mark test_init log_show_author 120 4
133 af21bb7e 2023-04-12 mark
134 af21bb7e 2023-04-12 mark local head_id=`git_show_head $testroot/repo`
135 af21bb7e 2023-04-12 mark local author_time=`git_show_author_time $testroot/repo`
136 af21bb7e 2023-04-12 mark local date=`date -u -r $author_time +"%a %b %e %X %Y UTC"`
137 283939fb 2024-04-23 op local ymd=`date -u -r $author_time +"%F"`
138 af21bb7e 2023-04-12 mark local head_id_len8=`trim_obj_id 32 $head_id`
139 af21bb7e 2023-04-12 mark
140 af21bb7e 2023-04-12 mark echo "mod alpha" > $testroot/repo/alpha
141 af21bb7e 2023-04-12 mark cd $testroot/repo && git add .
142 af21bb7e 2023-04-12 mark cd $testroot/repo && \
143 af21bb7e 2023-04-12 mark git commit --author "Johnny Cash <john@cash.net>" -m author > \
144 af21bb7e 2023-04-12 mark /dev/null
145 af21bb7e 2023-04-12 mark
146 af21bb7e 2023-04-12 mark local commit1=`git_show_head $testroot/repo`
147 af21bb7e 2023-04-12 mark local id1_len8=`trim_obj_id 32 $commit1`
148 af21bb7e 2023-04-12 mark
149 5bde4759 2023-04-15 mark cat <<EOF >$TOG_TEST_SCRIPT
150 af21bb7e 2023-04-12 mark @ toggle show author
151 af21bb7e 2023-04-12 mark SCREENDUMP
152 af21bb7e 2023-04-12 mark EOF
153 af21bb7e 2023-04-12 mark
154 af21bb7e 2023-04-12 mark cat <<EOF >$testroot/view.expected
155 af21bb7e 2023-04-12 mark commit $commit1 [1/2] master
156 689555c9 2023-05-15 stsp $ymd $id1_len8 john [master] author
157 af21bb7e 2023-04-12 mark $ymd $head_id_len8 flan_hacker adding the test tree
158 af21bb7e 2023-04-12 mark :show commit author
159 af21bb7e 2023-04-12 mark EOF
160 af21bb7e 2023-04-12 mark
161 af21bb7e 2023-04-12 mark cd $testroot/repo && tog log
162 af21bb7e 2023-04-12 mark cmp -s $testroot/view.expected $testroot/view
163 af21bb7e 2023-04-12 mark ret=$?
164 af21bb7e 2023-04-12 mark if [ $ret -ne 0 ]; then
165 af21bb7e 2023-04-12 mark diff -u $testroot/view.expected $testroot/view
166 af21bb7e 2023-04-12 mark test_done "$testroot" "$ret"
167 af21bb7e 2023-04-12 mark return 1
168 af21bb7e 2023-04-12 mark fi
169 af21bb7e 2023-04-12 mark
170 af21bb7e 2023-04-12 mark test_done "$testroot" "$ret"
171 af21bb7e 2023-04-12 mark }
172 af21bb7e 2023-04-12 mark
173 af21bb7e 2023-04-12 mark test_log_scroll_right()
174 af21bb7e 2023-04-12 mark {
175 af21bb7e 2023-04-12 mark test_init log_scroll_right 80 3
176 af21bb7e 2023-04-12 mark
177 af21bb7e 2023-04-12 mark local head_id=`git_show_head $testroot/repo`
178 af21bb7e 2023-04-12 mark local author_time=`git_show_author_time $testroot/repo`
179 af21bb7e 2023-04-12 mark local date=`date -u -r $author_time +"%a %b %e %X %Y UTC"`
180 283939fb 2024-04-23 op local ymd=`date -u -r $author_time +"%F"`
181 af21bb7e 2023-04-12 mark local msg="scroll this log message to the right four characters"
182 689555c9 2023-05-15 stsp local scrolled_msg="ter] scroll this log message to the right four character"
183 af21bb7e 2023-04-12 mark
184 af21bb7e 2023-04-12 mark echo "mod alpha" > $testroot/repo/alpha
185 af21bb7e 2023-04-12 mark cd $testroot/repo && git add . && git commit -m "$msg" > /dev/null
186 af21bb7e 2023-04-12 mark
187 af21bb7e 2023-04-12 mark local commit1=`git_show_head $testroot/repo`
188 af21bb7e 2023-04-12 mark
189 5bde4759 2023-04-15 mark cat <<EOF >$TOG_TEST_SCRIPT
190 af21bb7e 2023-04-12 mark l scroll right
191 af21bb7e 2023-04-12 mark l scroll right
192 af21bb7e 2023-04-12 mark SCREENDUMP
193 af21bb7e 2023-04-12 mark EOF
194 af21bb7e 2023-04-12 mark
195 af21bb7e 2023-04-12 mark cat <<EOF >$testroot/view.expected
196 af21bb7e 2023-04-12 mark commit $commit1 [1/2] master
197 af21bb7e 2023-04-12 mark $ymd flan_hacker $scrolled_msg
198 af21bb7e 2023-04-12 mark $ymd flan_hacker ng the test tree
199 af21bb7e 2023-04-12 mark EOF
200 af21bb7e 2023-04-12 mark
201 af21bb7e 2023-04-12 mark cd $testroot/repo && tog log
202 af21bb7e 2023-04-12 mark cmp -s $testroot/view.expected $testroot/view
203 af21bb7e 2023-04-12 mark ret=$?
204 af21bb7e 2023-04-12 mark if [ $ret -ne 0 ]; then
205 af21bb7e 2023-04-12 mark diff -u $testroot/view.expected $testroot/view
206 af21bb7e 2023-04-12 mark test_done "$testroot" "$ret"
207 af21bb7e 2023-04-12 mark return 1
208 af21bb7e 2023-04-12 mark fi
209 af21bb7e 2023-04-12 mark
210 af21bb7e 2023-04-12 mark test_done "$testroot" "$ret"
211 af21bb7e 2023-04-12 mark }
212 af21bb7e 2023-04-12 mark
213 af21bb7e 2023-04-12 mark test_log_hsplit_ref()
214 af21bb7e 2023-04-12 mark {
215 af21bb7e 2023-04-12 mark test_init log_hsplit_ref 80 10
216 af21bb7e 2023-04-12 mark
217 af21bb7e 2023-04-12 mark local head_id=`git_show_head $testroot/repo`
218 af21bb7e 2023-04-12 mark local author_time=`git_show_author_time $testroot/repo`
219 af21bb7e 2023-04-12 mark local date=`date -u -r $author_time +"%a %b %e %X %Y UTC"`
220 283939fb 2024-04-23 op local ymd=`date -u -r $author_time +"%F"`
221 af21bb7e 2023-04-12 mark
222 5bde4759 2023-04-15 mark cat <<EOF >$TOG_TEST_SCRIPT
223 af21bb7e 2023-04-12 mark R open ref view
224 af21bb7e 2023-04-12 mark S toggle horizontal split
225 af21bb7e 2023-04-12 mark - reduce size of ref view split
226 af21bb7e 2023-04-12 mark SCREENDUMP
227 af21bb7e 2023-04-12 mark EOF
228 af21bb7e 2023-04-12 mark
229 af21bb7e 2023-04-12 mark cat <<EOF >$testroot/view.expected
230 af21bb7e 2023-04-12 mark commit $head_id [1/1] master
231 689555c9 2023-05-15 stsp $ymd flan_hacker [master] adding the test tree
232 af21bb7e 2023-04-12 mark
233 af21bb7e 2023-04-12 mark --------------------------------------------------------------------------------
234 af21bb7e 2023-04-12 mark references [1/2]
235 af21bb7e 2023-04-12 mark HEAD -> refs/heads/master
236 af21bb7e 2023-04-12 mark refs/heads/master
237 af21bb7e 2023-04-12 mark
238 af21bb7e 2023-04-12 mark
239 af21bb7e 2023-04-12 mark
240 af21bb7e 2023-04-12 mark EOF
241 af21bb7e 2023-04-12 mark
242 af21bb7e 2023-04-12 mark cd $testroot/repo && tog log
243 af21bb7e 2023-04-12 mark cmp -s $testroot/view.expected $testroot/view
244 af21bb7e 2023-04-12 mark ret=$?
245 af21bb7e 2023-04-12 mark if [ $ret -ne 0 ]; then
246 af21bb7e 2023-04-12 mark diff -u $testroot/view.expected $testroot/view
247 af21bb7e 2023-04-12 mark test_done "$testroot" "$ret"
248 af21bb7e 2023-04-12 mark return 1
249 af21bb7e 2023-04-12 mark fi
250 af21bb7e 2023-04-12 mark
251 af21bb7e 2023-04-12 mark test_done "$testroot" "$ret"
252 af21bb7e 2023-04-12 mark }
253 af21bb7e 2023-04-12 mark
254 af21bb7e 2023-04-12 mark test_log_hsplit_tree()
255 af21bb7e 2023-04-12 mark {
256 af21bb7e 2023-04-12 mark test_init log_hsplit_tree 80 10
257 af21bb7e 2023-04-12 mark
258 af21bb7e 2023-04-12 mark local head_id=`git_show_head $testroot/repo`
259 af21bb7e 2023-04-12 mark local author_time=`git_show_author_time $testroot/repo`
260 af21bb7e 2023-04-12 mark local date=`date -u -r $author_time +"%a %b %e %X %Y UTC"`
261 283939fb 2024-04-23 op local ymd=`date -u -r $author_time +"%F"`
262 af21bb7e 2023-04-12 mark
263 5bde4759 2023-04-15 mark cat <<EOF >$TOG_TEST_SCRIPT
264 af21bb7e 2023-04-12 mark T open tree view
265 af21bb7e 2023-04-12 mark S toggle horizontal split
266 af21bb7e 2023-04-12 mark j move selection cursor down one entry to "beta"
267 af21bb7e 2023-04-12 mark - reduce size of tree view split
268 af21bb7e 2023-04-12 mark SCREENDUMP
269 af21bb7e 2023-04-12 mark EOF
270 af21bb7e 2023-04-12 mark
271 af21bb7e 2023-04-12 mark cat <<EOF >$testroot/view.expected
272 af21bb7e 2023-04-12 mark commit $head_id [1/1] master
273 689555c9 2023-05-15 stsp $ymd flan_hacker [master] adding the test tree
274 af21bb7e 2023-04-12 mark
275 af21bb7e 2023-04-12 mark --------------------------------------------------------------------------------
276 af21bb7e 2023-04-12 mark commit $head_id
277 af21bb7e 2023-04-12 mark [2/4] /
278 af21bb7e 2023-04-12 mark
279 af21bb7e 2023-04-12 mark alpha
280 af21bb7e 2023-04-12 mark beta
281 af21bb7e 2023-04-12 mark epsilon/
282 af21bb7e 2023-04-12 mark EOF
283 af21bb7e 2023-04-12 mark
284 af21bb7e 2023-04-12 mark cd $testroot/repo && tog log
285 af21bb7e 2023-04-12 mark cmp -s $testroot/view.expected $testroot/view
286 af21bb7e 2023-04-12 mark ret=$?
287 af21bb7e 2023-04-12 mark if [ $ret -ne 0 ]; then
288 af21bb7e 2023-04-12 mark diff -u $testroot/view.expected $testroot/view
289 af21bb7e 2023-04-12 mark test_done "$testroot" "$ret"
290 af21bb7e 2023-04-12 mark return 1
291 af21bb7e 2023-04-12 mark fi
292 af21bb7e 2023-04-12 mark
293 af21bb7e 2023-04-12 mark test_done "$testroot" "$ret"
294 af21bb7e 2023-04-12 mark }
295 af21bb7e 2023-04-12 mark
296 af21bb7e 2023-04-12 mark test_log_logmsg_widechar()
297 af21bb7e 2023-04-12 mark {
298 af21bb7e 2023-04-12 mark # make view wide enough to fit logmsg line length
299 af21bb7e 2023-04-12 mark # but short enough so long diff lines are truncated
300 af21bb7e 2023-04-12 mark test_init log_logmsg_widechar 182 30
301 af21bb7e 2023-04-12 mark widechar_commit $testroot/repo
302 af21bb7e 2023-04-12 mark
303 af21bb7e 2023-04-12 mark local head_id=`git_show_head $testroot/repo`
304 af21bb7e 2023-04-12 mark local author_time=`git_show_author_time $testroot/repo`
305 af21bb7e 2023-04-12 mark local date=`date -u -r $author_time +"%a %b %e %X %Y UTC"`
306 af21bb7e 2023-04-12 mark local commit1=`git_show_parent_commit $testroot/repo`
307 af21bb7e 2023-04-12 mark local blobid=`get_blob_id $testroot/repo "" $(widechar_filename)`
308 af21bb7e 2023-04-12 mark
309 5bde4759 2023-04-15 mark cat <<EOF >$TOG_TEST_SCRIPT
310 af21bb7e 2023-04-12 mark KEY_ENTER open selected commit in diff view
311 af21bb7e 2023-04-12 mark F toggle fullscreen
312 af21bb7e 2023-04-12 mark SCREENDUMP
313 af21bb7e 2023-04-12 mark EOF
314 af21bb7e 2023-04-12 mark
315 af21bb7e 2023-04-12 mark cat <<EOF >$testroot/view.expected
316 af21bb7e 2023-04-12 mark [1/26] diff $commit1 $head_id
317 af21bb7e 2023-04-12 mark commit $head_id (master)
318 af21bb7e 2023-04-12 mark from: Flan Hacker <flan_hacker@openbsd.org>
319 af21bb7e 2023-04-12 mark date: $date
320 af21bb7e 2023-04-12 mark
321 af21bb7e 2023-04-12 mark $(widechar_logmsg)
322 af21bb7e 2023-04-12 mark
323 af21bb7e 2023-04-12 mark A $(widechar_filename) | 5+ 0-
324 af21bb7e 2023-04-12 mark
325 af21bb7e 2023-04-12 mark 1 file changed, 5 insertions(+), 0 deletions(-)
326 af21bb7e 2023-04-12 mark
327 af21bb7e 2023-04-12 mark commit - $commit1
328 af21bb7e 2023-04-12 mark commit + $head_id
329 af21bb7e 2023-04-12 mark blob - /dev/null
330 af21bb7e 2023-04-12 mark blob + $blobid (mode 644)
331 af21bb7e 2023-04-12 mark --- /dev/null
332 af21bb7e 2023-04-12 mark +++ $(widechar_filename)
333 af21bb7e 2023-04-12 mark @@ -0,0 +1,5 @@
334 af21bb7e 2023-04-12 mark +ウィリアム・ユワート・グラッドストン(英語: William Ewart Gladstone PC FRS FSS、1809年12月29日 - 1898年5月19日)は、イギリスの政治家。
335 af21bb7e 2023-04-12 mark +
336 af21bb7e 2023-04-12 mark +ヴィクトリア朝中期から後期にかけて、自由党を指導して、4度にわたり首相を務めた。
337 af21bb7e 2023-04-12 mark +
338 af21bb7e 2023-04-12 mark +生涯を通じて敬虔なイングランド国教会の信徒であり、キリスト教の精神を政治に反映させることを目指した。多くの自由主義改革を行い、帝国主義にも批判的であった。好敵手である保守党党首ベン
339 af21bb7e 2023-04-12 mark
340 af21bb7e 2023-04-12 mark
341 af21bb7e 2023-04-12 mark
342 af21bb7e 2023-04-12 mark (END)
343 af21bb7e 2023-04-12 mark EOF
344 af21bb7e 2023-04-12 mark
345 af21bb7e 2023-04-12 mark cd $testroot/repo && tog log
346 af21bb7e 2023-04-12 mark cmp -s $testroot/view.expected $testroot/view
347 af21bb7e 2023-04-12 mark ret=$?
348 af21bb7e 2023-04-12 mark if [ $ret -ne 0 ]; then
349 af21bb7e 2023-04-12 mark diff -u $testroot/view.expected $testroot/view
350 c4df265e 2023-07-19 mark test_done "$testroot" "$ret"
351 c4df265e 2023-07-19 mark return 1
352 c4df265e 2023-07-19 mark fi
353 c4df265e 2023-07-19 mark
354 c4df265e 2023-07-19 mark test_done "$testroot" "$ret"
355 c4df265e 2023-07-19 mark }
356 c4df265e 2023-07-19 mark
357 c4df265e 2023-07-19 mark test_log_commit_keywords()
358 c4df265e 2023-07-19 mark {
359 c4df265e 2023-07-19 mark test_init log_commit_keywords 120 10
360 c4df265e 2023-07-19 mark local repo="$testroot/repo"
361 c4df265e 2023-07-19 mark local wt="$testroot/wt"
362 c4df265e 2023-07-19 mark local id=$(git_show_head "$repo")
363 c4df265e 2023-07-19 mark local author_time=$(git_show_author_time "$repo")
364 283939fb 2024-04-23 op local ymd=$(date -u -r $author_time +"%F")
365 c4df265e 2023-07-19 mark
366 79c49d84 2023-07-24 mark set -- "$id"
367 c4df265e 2023-07-19 mark
368 c4df265e 2023-07-19 mark got checkout "$repo" "$wt" > /dev/null
369 c4df265e 2023-07-19 mark ret=$?
370 c4df265e 2023-07-19 mark if [ $ret -ne 0 ]; then
371 c4df265e 2023-07-19 mark echo "got checkout failed unexpectedly"
372 c4df265e 2023-07-19 mark test_done "$testroot" "$ret"
373 c4df265e 2023-07-19 mark return 1
374 c4df265e 2023-07-19 mark fi
375 c4df265e 2023-07-19 mark
376 c4df265e 2023-07-19 mark # move into the work tree (test is run in a subshell)
377 c4df265e 2023-07-19 mark cd "$wt"
378 c4df265e 2023-07-19 mark echo -n > alpha
379 c4df265e 2023-07-19 mark
380 c4df265e 2023-07-19 mark for i in $(seq 8); do
381 c4df265e 2023-07-19 mark echo "alpha $i" >> alpha
382 c4df265e 2023-07-19 mark
383 c4df265e 2023-07-19 mark got ci -m "commit $i" > /dev/null
384 c4df265e 2023-07-19 mark ret=$?
385 c4df265e 2023-07-19 mark if [ $ret -ne 0 ]; then
386 c4df265e 2023-07-19 mark echo "commit failed unexpectedly" >&2
387 c4df265e 2023-07-19 mark test_done "$testroot" "$ret"
388 c4df265e 2023-07-19 mark return 1
389 c4df265e 2023-07-19 mark fi
390 c4df265e 2023-07-19 mark
391 c4df265e 2023-07-19 mark id=$(git_show_head "$repo")
392 79c49d84 2023-07-24 mark set -- "$@" "$id"
393 c4df265e 2023-07-19 mark done
394 c4df265e 2023-07-19 mark
395 c4df265e 2023-07-19 mark cat <<-EOF >$TOG_TEST_SCRIPT
396 99301cec 2023-07-24 stsp WAIT_FOR_UI wait for log thread to finish
397 c4df265e 2023-07-19 mark SCREENDUMP
398 c4df265e 2023-07-19 mark EOF
399 c4df265e 2023-07-19 mark
400 c4df265e 2023-07-19 mark cat <<-EOF >$testroot/view.expected
401 79c49d84 2023-07-24 mark commit $(pop_idx 5 $@) [1/5]
402 79c49d84 2023-07-24 mark $ymd $(trim_obj_id 32 $(pop_idx 5 $@)) flan_hacker commit 4
403 79c49d84 2023-07-24 mark $ymd $(trim_obj_id 32 $(pop_idx 4 $@)) flan_hacker commit 3
404 79c49d84 2023-07-24 mark $ymd $(trim_obj_id 32 $(pop_idx 3 $@)) flan_hacker commit 2
405 79c49d84 2023-07-24 mark $ymd $(trim_obj_id 32 $(pop_idx 2 $@)) flan_hacker commit 1
406 79c49d84 2023-07-24 mark $ymd $(trim_obj_id 32 $(pop_idx 1 $@)) flan_hacker adding the test tree
407 c4df265e 2023-07-19 mark
408 c4df265e 2023-07-19 mark
409 c4df265e 2023-07-19 mark
410 c4df265e 2023-07-19 mark
411 c4df265e 2023-07-19 mark EOF
412 c4df265e 2023-07-19 mark
413 c4df265e 2023-07-19 mark tog log -c:base:-4
414 c4df265e 2023-07-19 mark cmp -s "$testroot/view.expected" "$testroot/view"
415 c4df265e 2023-07-19 mark ret=$?
416 c4df265e 2023-07-19 mark if [ $ret -ne 0 ]; then
417 c4df265e 2023-07-19 mark diff -u "$testroot/view.expected" "$testroot/view"
418 c4df265e 2023-07-19 mark test_done "$testroot" "$ret"
419 c4df265e 2023-07-19 mark return 1
420 c4df265e 2023-07-19 mark fi
421 c4df265e 2023-07-19 mark
422 c4df265e 2023-07-19 mark cat <<-EOF >$testroot/view.expected
423 79c49d84 2023-07-24 mark commit $(pop_idx 7 $@) [1/7]
424 79c49d84 2023-07-24 mark $ymd $(trim_obj_id 32 $(pop_idx 7 $@)) flan_hacker commit 6
425 79c49d84 2023-07-24 mark $ymd $(trim_obj_id 32 $(pop_idx 6 $@)) flan_hacker commit 5
426 79c49d84 2023-07-24 mark $ymd $(trim_obj_id 32 $(pop_idx 5 $@)) flan_hacker commit 4
427 79c49d84 2023-07-24 mark $ymd $(trim_obj_id 32 $(pop_idx 4 $@)) flan_hacker commit 3
428 79c49d84 2023-07-24 mark $ymd $(trim_obj_id 32 $(pop_idx 3 $@)) flan_hacker commit 2
429 79c49d84 2023-07-24 mark $ymd $(trim_obj_id 32 $(pop_idx 2 $@)) flan_hacker commit 1
430 79c49d84 2023-07-24 mark $ymd $(trim_obj_id 32 $(pop_idx 1 $@)) flan_hacker adding the test tree
431 c4df265e 2023-07-19 mark
432 c4df265e 2023-07-19 mark
433 c4df265e 2023-07-19 mark EOF
434 c4df265e 2023-07-19 mark
435 c4df265e 2023-07-19 mark tog log -r "$repo" -c:head:-2
436 c4df265e 2023-07-19 mark cmp -s "$testroot/view.expected" "$testroot/view"
437 c4df265e 2023-07-19 mark ret=$?
438 c4df265e 2023-07-19 mark if [ $ret -ne 0 ]; then
439 c4df265e 2023-07-19 mark diff -u "$testroot/view.expected" "$testroot/view"
440 af21bb7e 2023-04-12 mark test_done "$testroot" "$ret"
441 af21bb7e 2023-04-12 mark return 1
442 af21bb7e 2023-04-12 mark fi
443 af21bb7e 2023-04-12 mark
444 c4df265e 2023-07-19 mark cat <<-EOF >$testroot/view.expected
445 79c49d84 2023-07-24 mark commit $(pop_idx 5 $@) [1/5]
446 79c49d84 2023-07-24 mark $ymd $(trim_obj_id 32 $(pop_idx 5 $@)) flan_hacker commit 4
447 79c49d84 2023-07-24 mark $ymd $(trim_obj_id 32 $(pop_idx 4 $@)) flan_hacker commit 3
448 79c49d84 2023-07-24 mark $ymd $(trim_obj_id 32 $(pop_idx 3 $@)) flan_hacker ~commit 2
449 79c49d84 2023-07-24 mark $ymd $(trim_obj_id 32 $(pop_idx 2 $@)) flan_hacker commit 1
450 79c49d84 2023-07-24 mark $ymd $(trim_obj_id 32 $(pop_idx 1 $@)) flan_hacker adding the test tree
451 c4df265e 2023-07-19 mark
452 c4df265e 2023-07-19 mark
453 c4df265e 2023-07-19 mark
454 c4df265e 2023-07-19 mark
455 c4df265e 2023-07-19 mark EOF
456 c4df265e 2023-07-19 mark
457 c4df265e 2023-07-19 mark got up -c:base:-6 > /dev/null
458 c4df265e 2023-07-19 mark ret=$?
459 c4df265e 2023-07-19 mark if [ $ret -ne 0 ]; then
460 c4df265e 2023-07-19 mark echo "got update failed unexpectedly"
461 c4df265e 2023-07-19 mark test_done "$testroot" "$ret"
462 c4df265e 2023-07-19 mark return 1
463 c4df265e 2023-07-19 mark fi
464 c4df265e 2023-07-19 mark
465 c4df265e 2023-07-19 mark tog log -c:base:+2
466 c4df265e 2023-07-19 mark cmp -s "$testroot/view.expected" "$testroot/view"
467 c4df265e 2023-07-19 mark ret=$?
468 c4df265e 2023-07-19 mark if [ $ret -ne 0 ]; then
469 c4df265e 2023-07-19 mark diff -u "$testroot/view.expected" "$testroot/view"
470 c4df265e 2023-07-19 mark test_done "$testroot" "$ret"
471 c4df265e 2023-07-19 mark return 1
472 c4df265e 2023-07-19 mark fi
473 c4df265e 2023-07-19 mark
474 c4df265e 2023-07-19 mark cat <<-EOF >$testroot/view.expected
475 79c49d84 2023-07-24 mark commit $(pop_idx 1 $@) [1/1]
476 79c49d84 2023-07-24 mark $ymd $(trim_obj_id 32 $(pop_idx 1 $@)) flan_hacker adding the test tree
477 c4df265e 2023-07-19 mark
478 c4df265e 2023-07-19 mark
479 c4df265e 2023-07-19 mark
480 c4df265e 2023-07-19 mark
481 c4df265e 2023-07-19 mark
482 c4df265e 2023-07-19 mark
483 c4df265e 2023-07-19 mark
484 c4df265e 2023-07-19 mark
485 c4df265e 2023-07-19 mark EOF
486 c4df265e 2023-07-19 mark
487 c4df265e 2023-07-19 mark tog log -c:base:-99
488 c4df265e 2023-07-19 mark cmp -s "$testroot/view.expected" "$testroot/view"
489 c4df265e 2023-07-19 mark ret=$?
490 c4df265e 2023-07-19 mark if [ $ret -ne 0 ]; then
491 c4df265e 2023-07-19 mark diff -u "$testroot/view.expected" "$testroot/view"
492 c4df265e 2023-07-19 mark test_done "$testroot" "$ret"
493 c4df265e 2023-07-19 mark return 1
494 c4df265e 2023-07-19 mark fi
495 c4df265e 2023-07-19 mark
496 af21bb7e 2023-04-12 mark test_done "$testroot" "$ret"
497 af21bb7e 2023-04-12 mark }
498 c935fd51 2023-07-23 mark
499 c935fd51 2023-07-23 mark test_log_show_base_commit()
500 c935fd51 2023-07-23 mark {
501 c935fd51 2023-07-23 mark # make view wide enough to show full headline
502 c935fd51 2023-07-23 mark test_init log_show_base_commit 80 3
503 c935fd51 2023-07-23 mark local repo="$testroot/repo"
504 c935fd51 2023-07-23 mark local id=$(git_show_head "$repo")
505 c935fd51 2023-07-23 mark
506 c935fd51 2023-07-23 mark echo "alpha" >> "$repo/alpha"
507 c935fd51 2023-07-23 mark git_commit "$repo" -m "base commit"
508 af21bb7e 2023-04-12 mark
509 c935fd51 2023-07-23 mark got checkout "$repo" "$testroot/wt" > /dev/null
510 c935fd51 2023-07-23 mark ret=$?
511 c935fd51 2023-07-23 mark if [ $ret -ne 0 ]; then
512 c935fd51 2023-07-23 mark echo "got checkout failed unexpectedly"
513 c935fd51 2023-07-23 mark test_done "$testroot" "$ret"
514 c935fd51 2023-07-23 mark return 1
515 c935fd51 2023-07-23 mark fi
516 c935fd51 2023-07-23 mark
517 c935fd51 2023-07-23 mark # move into the work tree (test is run in a subshell)
518 c935fd51 2023-07-23 mark cd "$testroot/wt"
519 c935fd51 2023-07-23 mark
520 c935fd51 2023-07-23 mark local head_id=$(git_show_head "$repo")
521 c935fd51 2023-07-23 mark local author_time=$(git_show_author_time "$repo")
522 283939fb 2024-04-23 op local ymd=$(date -u -r "$author_time" +"%F")
523 c935fd51 2023-07-23 mark
524 c935fd51 2023-07-23 mark # check up-to-date base commit marker prefixes base commit log message
525 c935fd51 2023-07-23 mark cat <<-EOF >$TOG_TEST_SCRIPT
526 99301cec 2023-07-24 stsp WAIT_FOR_UI wait for log thread to finish
527 c935fd51 2023-07-23 mark SCREENDUMP
528 c935fd51 2023-07-23 mark EOF
529 c935fd51 2023-07-23 mark
530 c935fd51 2023-07-23 mark cat <<-EOF >$testroot/view.expected
531 c935fd51 2023-07-23 mark commit $head_id [1/2] master
532 c935fd51 2023-07-23 mark $ymd flan_hacker *[master] base commit
533 c935fd51 2023-07-23 mark $ymd flan_hacker adding the test tree
534 c935fd51 2023-07-23 mark EOF
535 c935fd51 2023-07-23 mark
536 c935fd51 2023-07-23 mark tog log
537 c935fd51 2023-07-23 mark cmp -s "$testroot/view.expected" "$testroot/view"
538 c935fd51 2023-07-23 mark ret=$?
539 c935fd51 2023-07-23 mark if [ $ret -ne 0 ]; then
540 c935fd51 2023-07-23 mark diff -u "$testroot/view.expected" "$testroot/view"
541 c935fd51 2023-07-23 mark test_done "$testroot" "$ret"
542 c935fd51 2023-07-23 mark return 1
543 c935fd51 2023-07-23 mark fi
544 c935fd51 2023-07-23 mark
545 c935fd51 2023-07-23 mark # check marker is not drawn when not in a work tree
546 c935fd51 2023-07-23 mark cat <<-EOF >$testroot/view.expected
547 c935fd51 2023-07-23 mark commit $head_id [1/2] master
548 c935fd51 2023-07-23 mark $ymd flan_hacker [master] base commit
549 c935fd51 2023-07-23 mark $ymd flan_hacker adding the test tree
550 c935fd51 2023-07-23 mark EOF
551 c935fd51 2023-07-23 mark
552 c935fd51 2023-07-23 mark tog log -r "$repo"
553 c935fd51 2023-07-23 mark cmp -s "$testroot/view.expected" "$testroot/view"
554 c935fd51 2023-07-23 mark ret=$?
555 c935fd51 2023-07-23 mark if [ $ret -ne 0 ]; then
556 c935fd51 2023-07-23 mark diff -u "$testroot/view.expected" "$testroot/view"
557 c935fd51 2023-07-23 mark test_done "$testroot" "$ret"
558 c935fd51 2023-07-23 mark return 1
559 c935fd51 2023-07-23 mark fi
560 c935fd51 2023-07-23 mark
561 c935fd51 2023-07-23 mark # check out-of-date marker is shown with a mixed-commit tree
562 c935fd51 2023-07-23 mark echo "mixed" > alpha
563 c935fd51 2023-07-23 mark got commit -m "new base mixed-commit" > /dev/null
564 c935fd51 2023-07-23 mark head_id=$(git_show_head "$repo")
565 c935fd51 2023-07-23 mark
566 c935fd51 2023-07-23 mark cat <<-EOF >$TOG_TEST_SCRIPT
567 99301cec 2023-07-24 stsp WAIT_FOR_UI wait for log thread to finish
568 c935fd51 2023-07-23 mark SCREENDUMP
569 c935fd51 2023-07-23 mark EOF
570 c935fd51 2023-07-23 mark
571 c935fd51 2023-07-23 mark cat <<-EOF >$testroot/view.expected
572 c935fd51 2023-07-23 mark commit $head_id [1/3] master
573 c935fd51 2023-07-23 mark $ymd flan_hacker ~[master] new base mixed-commit
574 c935fd51 2023-07-23 mark $ymd flan_hacker base commit
575 f641a707 2023-09-05 mark EOF
576 f641a707 2023-09-05 mark
577 f641a707 2023-09-05 mark tog log
578 f641a707 2023-09-05 mark cmp -s "$testroot/view.expected" "$testroot/view"
579 f641a707 2023-09-05 mark ret=$?
580 f641a707 2023-09-05 mark if [ $ret -ne 0 ]; then
581 f641a707 2023-09-05 mark diff -u "$testroot/view.expected" "$testroot/view"
582 f641a707 2023-09-05 mark test_done "$testroot" "$ret"
583 f641a707 2023-09-05 mark return 1
584 f641a707 2023-09-05 mark fi
585 f641a707 2023-09-05 mark
586 f641a707 2023-09-05 mark test_done "$testroot" "$ret"
587 f641a707 2023-09-05 mark }
588 f641a707 2023-09-05 mark
589 f641a707 2023-09-05 mark test_log_limit_view()
590 f641a707 2023-09-05 mark {
591 f641a707 2023-09-05 mark test_init log_limit_view 80 4
592 f641a707 2023-09-05 mark local repo="$testroot/repo"
593 f641a707 2023-09-05 mark local wt="$testroot/wt"
594 f641a707 2023-09-05 mark
595 f641a707 2023-09-05 mark got checkout "$repo" "$wt" > /dev/null
596 f641a707 2023-09-05 mark ret=$?
597 f641a707 2023-09-05 mark if [ $ret -ne 0 ]; then
598 f641a707 2023-09-05 mark echo "got checkout failed unexpectedly"
599 f641a707 2023-09-05 mark test_done "$testroot" "$ret"
600 f641a707 2023-09-05 mark return 1
601 f641a707 2023-09-05 mark fi
602 f641a707 2023-09-05 mark
603 f641a707 2023-09-05 mark cd "$wt"
604 f641a707 2023-09-05 mark
605 f641a707 2023-09-05 mark echo "alpha0" > alpha
606 f641a707 2023-09-05 mark got commit -m alpha0 > /dev/null
607 f641a707 2023-09-05 mark ret=$?
608 f641a707 2023-09-05 mark if [ $ret -ne 0 ]; then
609 f641a707 2023-09-05 mark echo "got commit failed unexpectedly" >&2
610 f641a707 2023-09-05 mark test_done "$testroot" "$ret"
611 f641a707 2023-09-05 mark return 1
612 f641a707 2023-09-05 mark fi
613 f641a707 2023-09-05 mark
614 f641a707 2023-09-05 mark echo "beta0" > beta
615 f641a707 2023-09-05 mark got commit -m beta0 > /dev/null
616 f641a707 2023-09-05 mark ret=$?
617 f641a707 2023-09-05 mark if [ $ret -ne 0 ]; then
618 f641a707 2023-09-05 mark echo "got commit failed unexpectedly" >&2
619 f641a707 2023-09-05 mark test_done "$testroot" "$ret"
620 f641a707 2023-09-05 mark return 1
621 f641a707 2023-09-05 mark fi
622 f641a707 2023-09-05 mark
623 f641a707 2023-09-05 mark echo "alpha1" > alpha
624 f641a707 2023-09-05 mark got commit -m alpha1 > /dev/null
625 f641a707 2023-09-05 mark ret=$?
626 f641a707 2023-09-05 mark if [ $ret -ne 0 ]; then
627 f641a707 2023-09-05 mark echo "got commit failed unexpectedly" >&2
628 f641a707 2023-09-05 mark test_done "$testroot" "$ret"
629 f641a707 2023-09-05 mark return 1
630 f641a707 2023-09-05 mark fi
631 f641a707 2023-09-05 mark
632 f641a707 2023-09-05 mark echo "beta1" > beta
633 f641a707 2023-09-05 mark got commit -m beta1 > /dev/null
634 f641a707 2023-09-05 mark ret=$?
635 f641a707 2023-09-05 mark if [ $ret -ne 0 ]; then
636 f641a707 2023-09-05 mark echo "got commit failed unexpectedly" >&2
637 f641a707 2023-09-05 mark test_done "$testroot" "$ret"
638 f641a707 2023-09-05 mark return 1
639 f641a707 2023-09-05 mark fi
640 f641a707 2023-09-05 mark local author_time=$(git_show_author_time "$repo")
641 283939fb 2024-04-23 op local ymd=$(date -u -r $author_time +"%F")
642 f641a707 2023-09-05 mark local id=$(git_show_head "$repo")
643 f641a707 2023-09-05 mark
644 f641a707 2023-09-05 mark # check base commit marker is not drawn
645 f641a707 2023-09-05 mark cat <<-EOF >$TOG_TEST_SCRIPT
646 f641a707 2023-09-05 mark &beta
647 f641a707 2023-09-05 mark SCREENDUMP
648 c935fd51 2023-07-23 mark EOF
649 c935fd51 2023-07-23 mark
650 f641a707 2023-09-05 mark cat <<-EOF >$testroot/view.expected
651 f641a707 2023-09-05 mark commit $id [1/2] master
652 f641a707 2023-09-05 mark $ymd flan_hacker [master] beta1
653 f641a707 2023-09-05 mark $ymd flan_hacker beta0
654 f641a707 2023-09-05 mark
655 f641a707 2023-09-05 mark EOF
656 f641a707 2023-09-05 mark
657 c935fd51 2023-07-23 mark tog log
658 c935fd51 2023-07-23 mark cmp -s "$testroot/view.expected" "$testroot/view"
659 c935fd51 2023-07-23 mark ret=$?
660 c935fd51 2023-07-23 mark if [ $ret -ne 0 ]; then
661 c935fd51 2023-07-23 mark diff -u "$testroot/view.expected" "$testroot/view"
662 f641a707 2023-09-05 mark fi
663 f641a707 2023-09-05 mark test_done "$testroot" "$ret"
664 f641a707 2023-09-05 mark }
665 f641a707 2023-09-05 mark
666 f641a707 2023-09-05 mark test_log_search()
667 f641a707 2023-09-05 mark {
668 f641a707 2023-09-05 mark test_init log_search 80 8
669 f641a707 2023-09-05 mark local repo="$testroot/repo"
670 f641a707 2023-09-05 mark local wt="$testroot/wt"
671 f641a707 2023-09-05 mark local id=$(git_show_head "$repo")
672 f641a707 2023-09-05 mark
673 f641a707 2023-09-05 mark set -- "$id"
674 f641a707 2023-09-05 mark
675 f641a707 2023-09-05 mark got checkout "$repo" "$wt" > /dev/null
676 f641a707 2023-09-05 mark ret=$?
677 f641a707 2023-09-05 mark if [ $ret -ne 0 ]; then
678 f641a707 2023-09-05 mark echo "got checkout failed unexpectedly"
679 c935fd51 2023-07-23 mark test_done "$testroot" "$ret"
680 c935fd51 2023-07-23 mark return 1
681 c935fd51 2023-07-23 mark fi
682 c935fd51 2023-07-23 mark
683 f641a707 2023-09-05 mark cd "$wt"
684 f641a707 2023-09-05 mark
685 f641a707 2023-09-05 mark for i in $(seq 16); do
686 f641a707 2023-09-05 mark echo "alpha $i" > alpha
687 f641a707 2023-09-05 mark
688 f641a707 2023-09-05 mark got ci -m "alpha commit $i" > /dev/null
689 f641a707 2023-09-05 mark ret=$?
690 f641a707 2023-09-05 mark if [ $ret -ne 0 ]; then
691 f641a707 2023-09-05 mark echo "got commit failed unexpectedly" >&2
692 f641a707 2023-09-05 mark test_done "$testroot" "$ret"
693 f641a707 2023-09-05 mark return 1
694 f641a707 2023-09-05 mark fi
695 f641a707 2023-09-05 mark
696 f641a707 2023-09-05 mark id=$(git_show_head "$repo")
697 f641a707 2023-09-05 mark set -- "$@" "$id"
698 f641a707 2023-09-05 mark done
699 f641a707 2023-09-05 mark
700 f641a707 2023-09-05 mark local author_time=$(git_show_author_time "$repo")
701 283939fb 2024-04-23 op local ymd=$(date -u -r $author_time +"%F")
702 f641a707 2023-09-05 mark
703 f641a707 2023-09-05 mark cat <<-EOF >$TOG_TEST_SCRIPT
704 f641a707 2023-09-05 mark /alpha commit 8
705 f641a707 2023-09-05 mark n
706 f641a707 2023-09-05 mark SCREENDUMP
707 f641a707 2023-09-05 mark EOF
708 f641a707 2023-09-05 mark
709 f641a707 2023-09-05 mark cat <<-EOF >$testroot/view.expected
710 f641a707 2023-09-05 mark commit $(pop_idx 9 $@) [9/17] no more matches
711 f641a707 2023-09-05 mark $ymd flan_hacker alpha commit 14
712 f641a707 2023-09-05 mark $ymd flan_hacker alpha commit 13
713 f641a707 2023-09-05 mark $ymd flan_hacker alpha commit 12
714 f641a707 2023-09-05 mark $ymd flan_hacker alpha commit 11
715 f641a707 2023-09-05 mark $ymd flan_hacker alpha commit 10
716 f641a707 2023-09-05 mark $ymd flan_hacker alpha commit 9
717 f641a707 2023-09-05 mark $ymd flan_hacker alpha commit 8
718 f641a707 2023-09-05 mark EOF
719 f641a707 2023-09-05 mark
720 f641a707 2023-09-05 mark tog log
721 f641a707 2023-09-05 mark cmp -s "$testroot/view.expected" "$testroot/view"
722 f641a707 2023-09-05 mark ret=$?
723 f641a707 2023-09-05 mark if [ $ret -ne 0 ]; then
724 f641a707 2023-09-05 mark diff -u "$testroot/view.expected" "$testroot/view"
725 f641a707 2023-09-05 mark fi
726 c935fd51 2023-07-23 mark test_done "$testroot" "$ret"
727 c935fd51 2023-07-23 mark }
728 c935fd51 2023-07-23 mark
729 af21bb7e 2023-04-12 mark test_parseargs "$@"
730 af21bb7e 2023-04-12 mark run_test test_log_hsplit_diff
731 af21bb7e 2023-04-12 mark run_test test_log_vsplit_diff
732 af21bb7e 2023-04-12 mark run_test test_log_show_author
733 af21bb7e 2023-04-12 mark run_test test_log_scroll_right
734 af21bb7e 2023-04-12 mark run_test test_log_hsplit_ref
735 af21bb7e 2023-04-12 mark run_test test_log_hsplit_tree
736 af21bb7e 2023-04-12 mark run_test test_log_logmsg_widechar
737 c4df265e 2023-07-19 mark run_test test_log_commit_keywords
738 c935fd51 2023-07-23 mark run_test test_log_show_base_commit
739 f641a707 2023-09-05 mark run_test test_log_limit_view
740 f641a707 2023-09-05 mark run_test test_log_search