README_DOCS.rst: update tg prev and tg next usage summary
[topgit/pro.git] / t / t1380-awk-topgit_recurse.sh
blob8bc9fa0c7114da75c056b0e01bd4c592f94840cb
1 #!/bin/sh
3 test_description='topgit_recurse.awk functionality'
5 TEST_NO_CREATE_REPO=1
7 . ./test-lib.sh
9 ap="$(tg --awk-path)" && test -n "$ap" && test -d "$ap" || die
10 aptr="$ap/topgit_recurse"
11 test -f "$aptr" && test -r "$aptr" && test -x "$aptr" || die
13 # Final output of topgit_deps looks like:
15 # t/top t/sub1
16 # t/top t/sub2
17 # t/top t/top (only when withbr=1)
19 # In other words, the output from topgit_deps is simply
20 # a list of TopGit Directed Acyclic Graph edges pointing
21 # from the branch name in the first field (via its .topdeps
22 # file) to the branch name in the second field.
24 # Of course, if the rev=1 was passed to topgit_deps it's
25 # all output backwards, but that's really irrelevant to
26 # the testing performed by this test.
28 test_plan 38
30 printf '%s\n' "ann1" >anlist1 || die
31 printf '%s\n' "ann1" "ann3" >anlist13 || die
32 printf '%s\n' "ann1" "ann3" "ann5" >anlist135 || die
33 printf '%s\n' "t/1" >brlist1 || die
34 printf '%s\n' "t/1" "t/3" >brlist13 || die
35 printf '%s\n' "t/1" "t/3" "t/5" >brlist135 || die
36 printf '%s\n' "hd1" >hdlist1 || die
37 printf '%s\n' "hd1" "hd3" >hdlist13 || die
38 printf '%s\n' "hd1" "hd3" "hd5" >hdlist135 || die
39 printf 'refs/heads/%s junk here\n' "hd1" >hdf1list1 || die
40 printf 'refs/heads/%s junk here\n' "hd1" "hd3" >hdf1list13 || die
41 printf 'refs/heads/%s junk here\n' "hd1" "hd3" "hd5" >hdf1list135 || die
42 printf ' junk here refs/heads/%s too \n' "hd1" >hdf3list1 || die
43 printf ' junk here refs/heads/%s too \n' "hd1" "hd3" >hdf3list13 || die
44 printf ' junk here refs/heads/%s too \n' "hd1" "hd3" "hd5" >hdf3list135 || die
45 printf 'some junk here too refs/heads/%s\n' "hd1" >hdf5list1 || die
46 printf 'some junk here too refs/heads/%s\n' "hd1" "hd3" >hdf5list13 || die
47 printf 'some junk here too refs/heads/%s\n' "hd1" "hd3" "hd5" >hdf5list135 || die
48 printf '%s\n' "t/1" >rtlist1 || die
49 printf '%s\n' "t/1" "t/3" >rtlist13 || die
50 printf '%s\n' "t/1" "t/3" "t/5" >rtlist135 || die
52 # optional first "-m[<n>]" will be stripped and then -v multib=<n> passed
53 # where <n> defaults to 1 if not specified
54 # first non-option arg is required, MUST be non-empty and is passed
55 # as the "startb" value to the awk script
56 tgrecurse_() { awk -f "$aptr" "$@"; }
57 tgrecurse() {
58 tgm_=
59 case "$1" in "-m"|"-m"[0-9]|"-m"[0-9][0-9])
60 tgm_="${1#??}"
61 : "${tgm_:=1}"
62 shift
63 esac
64 test x"$1" != x || die 'tgrecurse requires non-empty arg 1 (startb)'
65 tgstartb_="$1"; shift
66 tgrecurse_ ${tgm_:+-v} ${tgm_:+multib=$tgm_} -v startb="$tgstartb_" "$@"
68 tgrecursemt() { tgrecurse "none" -v filter=1 "$@"; }
70 test_expect_success 'topgit_recurse runs' '
71 # some stupid awks might not even compile it
72 >expected &&
73 awk -f "$aptr" -v startb=none -v filter=1 </dev/null >actual &&
74 test_cmp actual expected &&
75 # and make sure the helper works too
76 echo "1 0 0 0 none" >expected &&
77 </dev/null tgrecurse "none" >actual &&
78 test_cmp actual expected
81 test_expect_success 'invalid brfile fails if read' '
82 rm -f no-such-file &&
83 test ! -e no-such-file &&
84 >expected &&
85 </dev/null test_must_fail tgrecursemt -v brfile=no-such-file >actual &&
86 test_cmp actual expected &&
87 echo "..." |
88 test_must_fail tgrecursemt -v brfile=no-such-file >actual &&
89 test_cmp actual expected &&
90 test ! -e no-such-file
93 test_expect_success 'invalid anfile fails if read' '
94 rm -f no-such-file &&
95 test ! -e no-such-file &&
96 >expected &&
97 </dev/null test_must_fail tgrecursemt -v anfile=no-such-file >actual &&
98 test_cmp actual expected &&
99 echo "..." |
100 test_must_fail tgrecursemt -v anfile=no-such-file >actual &&
101 test_cmp actual expected &&
102 test ! -e no-such-file
105 test_expect_success 'invalid hdfile fails if read' '
106 rm -f no-such-file &&
107 test ! -e no-such-file &&
108 >expected &&
109 </dev/null test_must_fail tgrecursemt -v hdfile=no-such-file >actual &&
110 test_cmp actual expected &&
111 echo "..." |
112 test_must_fail tgrecursemt -v hdfile=no-such-file >actual &&
113 test_cmp actual expected &&
114 test ! -e no-such-file
117 test_expect_success 'invalid rtfile fails if read' '
118 rm -f no-such-file &&
119 test ! -e no-such-file &&
120 >expected &&
121 </dev/null tgrecursemt -v rtfile=no-such-file >actual &&
122 test_cmp actual expected &&
123 echo "..." |
124 tgrecursemt -v rtfile=no-such-file >actual &&
125 test_cmp actual expected &&
126 </dev/null test_must_fail tgrecurse "none" -v rtfile=no-such-file >actual &&
127 test_cmp actual expected &&
128 echo "..." |
129 test_must_fail tgrecurse "none" -v rtfile=no-such-file >actual &&
130 test_cmp actual expected &&
131 test ! -e no-such-file
134 test_expect_success 'brfile unperturbed without rmbr' '
135 echo "br file here" >brorig &&
136 cat brorig >brfile &&
137 >expected &&
138 </dev/null tgrecursemt -v brfile=brfile >actual &&
139 test_cmp actual expected &&
140 test_cmp brfile brorig &&
141 echo "..." | tgrecursemt -v brfile=brfile >actual &&
142 test_cmp actual expected &&
143 test_cmp brfile brorig
146 test_expect_success 'anfile unperturbed without rman' '
147 echo "an file here" >anorig &&
148 cat anorig >anfile &&
149 >expected &&
150 </dev/null tgrecursemt -v anfile=anfile >actual &&
151 test_cmp actual expected &&
152 test_cmp anfile anorig &&
153 echo "..." | tgrecursemt -v anfile=anfile >actual &&
154 test_cmp actual expected &&
155 test_cmp anfile anorig
158 test_expect_success 'hdfile unperturbed without rmhd' '
159 echo "hd file here" >hdorig &&
160 cat hdorig >hdfile &&
161 >expected &&
162 </dev/null tgrecursemt -v hdfile=hdfile >actual &&
163 test_cmp actual expected &&
164 test_cmp hdfile hdorig &&
165 echo "..." | tgrecursemt -v hdfile=hdfile >actual &&
166 test_cmp actual expected &&
167 test_cmp hdfile hdorig
170 test_expect_success 'rtfile unperturbed without rmrt' '
171 echo "rt file here" >rtorig &&
172 cat rtorig >rtfile &&
173 >expected &&
174 </dev/null tgrecursemt -v rtfile=rtfile >actual &&
175 test_cmp actual expected &&
176 test_cmp rtfile rtorig &&
177 echo "..." | tgrecursemt -v rtfile=rtfile >actual &&
178 test_cmp actual expected &&
179 test_cmp hdfile hdorig &&
180 echo "1 0 0 0 none" >expected &&
181 </dev/null tgrecurse "none" -v rtfile=rtfile >actual &&
182 test_cmp actual expected &&
183 test_cmp hdfile hdorig &&
184 echo "..." | tgrecurse "none" -v rtfile=rtfile >actual &&
185 test_cmp actual expected &&
186 test_cmp hdfile hdorig
189 test_expect_success 'brfile removed with rmbr' '
190 echo "br file here" >brorig &&
191 cat brorig >brfile &&
192 >expected &&
193 </dev/null tgrecursemt -v brfile=brfile -v rmbr=1 >actual &&
194 test_cmp actual expected &&
195 test ! -e brfile &&
196 cat brorig >brfile &&
197 echo "..." | tgrecursemt -v brfile=brfile -v rmbr=1 >actual &&
198 test_cmp actual expected &&
199 test ! -e brfile
202 test_expect_success 'anfile removed with rman' '
203 echo "an file here" >anorig &&
204 cat anorig >anfile &&
205 >expected &&
206 </dev/null tgrecursemt -v anfile=anfile -v rman=1 >actual &&
207 test_cmp actual expected &&
208 test ! -e anfile &&
209 cat anorig >anfile &&
210 echo "..." | tgrecursemt -v anfile=anfile -v rman=1 >actual &&
211 test_cmp actual expected &&
212 test ! -e anfile
215 test_expect_success 'hdfile removed with rmhd' '
216 echo "hd file here" >hdorig &&
217 cat hdorig >hdfile &&
218 >expected &&
219 </dev/null tgrecursemt -v hdfile=hdfile -v rmhd=1 >actual &&
220 test_cmp actual expected &&
221 test ! -e hdfile &&
222 cat hdorig >hdfile &&
223 echo "..." | tgrecursemt -v hdfile=hdfile -v rmhd=1 >actual &&
224 test_cmp actual expected &&
225 test ! -e hdfile
228 test_expect_success 'rtfile removed with rmrt' '
229 echo "rt file here" >rtorig &&
230 cat rtorig >rtfile &&
231 >expected &&
232 </dev/null tgrecursemt -v rtfile=rtfile -v rmrt=1 >actual &&
233 test_cmp actual expected &&
234 test ! -e rtfile &&
235 cat rtorig >rtfile &&
236 echo "..." | tgrecursemt -v rtfile=rtfile -v rmrt=1 >actual &&
237 test_cmp actual expected &&
238 test ! -e rtfile &&
239 cat rtorig >rtfile &&
240 echo "1 0 0 0 none" >expected &&
241 </dev/null tgrecurse "none" -v rtfile=rtfile -v rmrt=1 >actual &&
242 test_cmp actual expected &&
243 test ! -e rtfile &&
244 cat rtorig >rtfile &&
245 echo "..." | tgrecurse "none" -v rtfile=rtfile -v rmrt=1 >actual &&
246 test_cmp actual expected &&
247 test ! -e rtfile
250 test_expect_success 'hdfile works' '
251 >expected &&
252 echo "1 0 0 0 hd3" >expectedM3 &&
253 echo "1 0 0 0 hd5" >expectedM5 &&
254 echo "0 0 1 0 hd1" >expectedB1 &&
255 echo "0 0 1 0 hd3" >expectedB3 &&
256 echo "0 0 1 0 hd5" >expectedB5 &&
257 echo "hd1" | tgrecurse "hd1" -v hdfile=hdlist1 >actual &&
258 test_cmp actual expected &&
259 echo "hd3" | tgrecurse "hd3" -v hdfile=hdlist1 >actual &&
260 test_cmp actual expectedM3 &&
261 echo "hd5" | tgrecurse "hd5" -v hdfile=hdlist135 >actual &&
262 test_cmp actual expected &&
263 echo "hd3" | tgrecurse "hd3" -v hdfile=hdlist13 >actual &&
264 test_cmp actual expected &&
265 echo "hd5" | tgrecurse "hd5" -v hdfile=hdlist13 >actual &&
266 test_cmp actual expectedM5 &&
267 echo "hd3" | tgrecurse "hd3" -v hdfile=hdlist135 >actual &&
268 test_cmp actual expected &&
269 echo "hd1" | tgrecurse "hd1" -v hdfile=hdlist1 -v withbr=1 >actual &&
270 test_cmp actual expectedB1 &&
271 echo "hd5" | tgrecurse "hd5" -v hdfile=hdlist135 -v withbr=1 >actual &&
272 test_cmp actual expectedB5 &&
273 echo "hd3" | tgrecurse "hd3" -v hdfile=hdlist13 -v withbr=1 >actual &&
274 test_cmp actual expectedB3 &&
275 echo "hd3" | tgrecurse "hd3" -v hdfile=hdlist135 -v withbr=1 >actual &&
276 test_cmp actual expectedB3
279 test_expect_success 'hdfile cut works' '
280 >expected &&
281 echo "1 0 0 0 hd3" >expectedM3 &&
282 echo "0 0 1 0 hd3" >expectedB3 &&
283 echo "hd3" | tgrecurse "hd3" -v hdfile=hdlist135 -v cuthd=1 >actual &&
284 test_cmp actual expectedM3 &&
285 echo "hd3" | tgrecurse "hd3" -v hdfile=hdf1list135 -v cuthd=2 >actual &&
286 test_cmp actual expectedM3 &&
287 echo "hd3" | tgrecurse "hd3" -v hdfile=hdf3list135 -v cuthd=1 >actual &&
288 test_cmp actual expectedM3 &&
289 echo "hd3" | tgrecurse "hd3" -v hdfile=hdf5list135 -v cuthd=4 >actual &&
290 test_cmp actual expectedM3 &&
291 echo "hd3" | tgrecurse "hd3" -v hdfile=hdf1list135 -v cuthd=1 >actual &&
292 test_cmp actual expected &&
293 echo "hd3" | tgrecurse "hd3" -v hdfile=hdf3list135 -v cuthd=3 >actual &&
294 test_cmp actual expected &&
295 echo "hd3" | tgrecurse "hd3" -v hdfile=hdf5list135 -v cuthd=5 >actual &&
296 test_cmp actual expected &&
297 echo "hd3" | tgrecurse "hd3" -v hdfile=hdf1list135 -v cuthd=1 -v withbr=1 >actual &&
298 test_cmp actual expectedB3 &&
299 echo "hd3" | tgrecurse "hd3" -v hdfile=hdf3list135 -v cuthd=3 -v withbr=1 >actual &&
300 test_cmp actual expectedB3 &&
301 echo "hd3" | tgrecurse "hd3" -v hdfile=hdf5list135 -v cuthd=5 -v withbr=1 >actual &&
302 test_cmp actual expectedB3
305 test_expect_success 'brfile works' '
306 cat <<-EOT >expected &&
307 0 0 1 0 t/5 t/3 t/1
308 0 1 0 0 t/3 t/1
309 0 0 1 1 t/5 t/1
311 printf "%s\n" "t/1 t/3" "t/1 t/5" "t/3 t/5" |
312 tgrecurse "t/1" -v hdfile=brlist135 -v brfile=brlist13 >actual &&
313 test_cmp actual expected &&
314 cat <<-EOT >expected &&
315 0 0 1 0 t/5 t/3 t/1
316 0 1 0 0 t/3 t/1
317 0 0 1 1 t/5 t/1
318 0 1 0 0 t/1
320 printf "%s\n" "t/1 t/3" "t/1 t/5" "t/3 t/5" |
321 tgrecurse "t/1" -v withbr=1 -v hdfile=brlist135 -v brfile=brlist13 >actual &&
322 test_cmp actual expected &&
323 cat <<-EOT >expected &&
324 0 1 0 0 t/3 t/1
326 printf "%s\n" "t/1 t/3" "t/1 t/5" "t/3 t/5" |
327 tgrecurse "t/1" -v hdfile=brlist135 -v brfile=brlist13 -v tgonly=1 >actual &&
328 test_cmp actual expected &&
329 cat <<-EOT >expected &&
330 0 1 0 0 t/3 t/1
331 0 1 0 0 t/1
333 printf "%s\n" "t/1 t/3" "t/1 t/5" "t/3 t/5" |
334 tgrecurse "t/1" -v withbr=1 -v hdfile=brlist135 -v brfile=brlist13 -v tgonly=1 >actual &&
335 test_cmp actual expected
338 test_expect_success 'anfile works' '
339 cat hdlist135 brlist135 anlist135 >hdlist &&
340 cat anlist135 >anlist &&
341 echo "t/5" >>anlist &&
342 echo "ann7" >>anlist &&
343 cat <<-EOT >graph &&
344 t/1 t/3
345 t/1 hd1
346 t/1 ann1
347 t/3 t/5
348 t/3 ann3
349 t/3 ann5
350 t/3 hd3
351 t/5 ann7
352 t/5 hd5
353 t/5 hd7
355 cat <<-EOT >expected &&
356 1 0 0 0 ann7 t/5 t/3 t/1
357 0 0 1 0 hd5 t/5 t/3 t/1
358 1 0 0 0 hd7 t/5 t/3 t/1
359 0 1 0 0 t/5 t/3 t/1
360 0 0 1 0 ann3 t/3 t/1
361 0 0 1 0 ann5 t/3 t/1
362 0 0 1 0 hd3 t/3 t/1
363 0 1 0 0 t/3 t/1
364 0 0 1 0 hd1 t/1
365 0 0 1 0 ann1 t/1
366 0 1 0 0 t/1
368 <graph tgrecurse "t/1" -v hdfile=hdlist -v brfile=brlist135 -v withbr=1 >actual &&
369 test_cmp actual expected &&
370 <graph tgrecurse "t/1" -v hdfile=hdlist -v brfile=brlist135 -v withbr=1 -v withan=1 >actual &&
371 test_cmp actual expected &&
372 cat <<-EOT >expected &&
373 0 1 2 0 t/5 t/3 t/1
374 0 1 2 0 ann3 t/3 t/1
375 0 1 2 0 ann5 t/3 t/1
376 0 0 1 0 hd3 t/3 t/1
377 0 1 0 0 t/3 t/1
378 0 0 1 0 hd1 t/1
379 0 1 2 0 ann1 t/1
380 0 1 0 0 t/1
382 <graph tgrecurse "t/1" -v hdfile=hdlist -v brfile=brlist135 -v withbr=1 -v anfile=anlist -v withan=1 >actual &&
383 test_cmp actual expected &&
384 cat <<-EOT >expected &&
385 0 0 1 0 hd3 t/3 t/1
386 0 1 0 0 t/3 t/1
387 0 0 1 0 hd1 t/1
388 0 1 0 0 t/1
390 <graph tgrecurse "t/1" -v hdfile=hdlist -v brfile=brlist135 -v withbr=1 -v anfile=anlist -v withan=0 >actual &&
391 test_cmp actual expected &&
392 <graph tgrecurse "t/1" -v hdfile=hdlist -v brfile=brlist135 -v withbr=1 -v anfile=anlist >actual &&
393 test_cmp actual expected &&
394 cat <<-EOT >expected &&
395 0 0 1 0 hd3 t/3 t/1
396 0 1 0 0 t/3 t/1
397 0 0 1 0 hd1 t/1
399 <graph tgrecurse "t/1" -v hdfile=hdlist -v brfile=brlist135 -v anfile=anlist >actual &&
400 test_cmp actual expected
403 test_expect_success 'rtfile works' '
404 cat hdlist135 brlist135 anlist135 >hdlist &&
405 cat anlist135 >anlist &&
406 echo "t/5" >>anlist &&
407 echo "ann7" >>anlist &&
408 cat <<-EOT >>rtlist &&
415 cat <<-EOT >graph &&
416 t/1 t/3
417 t/1 hd1
418 t/1 ann1
419 t/3 t/5
420 t/3 ann3
421 t/3 ann5
422 t/3 hd3
423 t/5 ann7
424 t/5 hd5
425 t/5 hd7
427 cat <<-EOT >expected &&
428 0 1 2 0 t/5 t/3 t/1
429 0 1 2 0 ann3 t/3 t/1
430 0 1 2 0 ann5 t/3 t/1
431 0 0 1 0 hd3 t/3 t/1
432 0 1 0 0 t/3 t/1
433 0 0 1 0 hd1 t/1
434 0 1 2 0 ann1 t/1
435 0 1 0 0 t/1
437 <graph tgrecurse "t/1" -v hdfile=hdlist -v brfile=brlist135 -v withbr=1 -v anfile=anlist -v withan=1 >actual &&
438 test_cmp actual expected &&
439 <graph tgrecurse "t/1" -v hdfile=hdlist -v brfile=brlist135 -v withbr=1 -v anfile=anlist -v withan=1 -v usermt=":refs/remotes/origin" >actual &&
440 test_cmp actual expected &&
441 cat <<-EOT >expected &&
442 0 1 2 0 t/5 t/3 t/1
443 0 1 2 0 ann3 t/3 t/1
444 0 1 2 0 ann5 t/3 t/1
445 0 0 1 0 hd3 t/3 t/1
446 0 2 0 0 t/3 t/1
447 0 0 1 0 hd1 t/1
448 0 1 2 0 ann1 t/1
449 0 2 0 0 t/1
451 <graph tgrecurse "t/1" -v hdfile=hdlist -v brfile=brlist135 -v withbr=1 -v anfile=anlist -v withan=1 -v rtfile=rtlist >actual &&
452 test_cmp actual expected &&
453 cat <<-EOT >expected &&
454 0 0 0 0 :refs/remotes/origin/t/1 t/1
455 0 0 0 0 :refs/remotes/origin/t/3 t/3 t/1
456 0 1 2 0 t/5 t/3 t/1
457 0 1 2 0 ann3 t/3 t/1
458 0 1 2 0 ann5 t/3 t/1
459 0 0 1 0 hd3 t/3 t/1
460 0 2 0 0 t/3 t/1
461 0 0 1 0 hd1 t/1
462 0 1 2 0 ann1 t/1
463 0 2 0 0 t/1
465 <graph tgrecurse "t/1" -v hdfile=hdlist -v brfile=brlist135 -v withbr=1 -v anfile=anlist -v withan=1 -v rtfile=rtlist -v usermt=":refs/remotes/origin" >actual &&
466 test_cmp actual expected &&
467 cat <<-EOT >expected &&
468 0 0 0 0 :refs/remotes/origin/t/1 t/1
469 0 0 0 0 :refs/remotes/origin/t/3 t/3 t/1
470 0 0 1 0 hd3 t/3 t/1
471 0 2 0 0 t/3 t/1
472 0 0 1 0 hd1 t/1
473 0 2 0 0 t/1
475 <graph tgrecurse "t/1" -v hdfile=hdlist -v brfile=brlist135 -v withbr=1 -v anfile=anlist -v rtfile=rtlist -v usermt=":refs/remotes/origin" >actual &&
476 test_cmp actual expected &&
477 cat <<-EOT >expected &&
478 0 0 0 0 :refs/remotes/origin/t/1 t/1
479 0 0 0 0 :refs/remotes/origin/t/3 t/3 t/1
480 0 0 0 0 :refs/remotes/origin/t/5 t/5 t/3 t/1
481 1 0 0 0 ann7 t/5 t/3 t/1
482 0 0 1 0 hd5 t/5 t/3 t/1
483 1 0 0 0 hd7 t/5 t/3 t/1
484 0 2 0 0 t/5 t/3 t/1
485 0 0 1 0 ann3 t/3 t/1
486 0 0 1 0 ann5 t/3 t/1
487 0 0 1 0 hd3 t/3 t/1
488 0 2 0 0 t/3 t/1
489 0 0 1 0 hd1 t/1
490 0 0 1 0 ann1 t/1
491 0 2 0 0 t/1
493 <graph tgrecurse "t/1" -v hdfile=hdlist -v brfile=brlist135 -v withbr=1 -v rtfile=rtlist -v usermt=":refs/remotes/origin" >actual &&
494 test_cmp actual expected &&
495 printf "%s\n" t/1 t/5 >rtlist &&
496 cat <<-EOT >expected &&
497 1 0 0 0 ann7 t/5 t/3 t/1
498 1 0 0 0 hd7 t/5 t/3 t/1
499 0 2 0 0 t/5 t/3 t/1
500 0 1 0 0 t/3 t/1
501 0 2 0 0 t/1
503 <graph tgrecurse "t/1" -v hdfile=hdlist -v brfile=brlist135 -v withbr=1 -v rtfile=rtlist -v usermt=":refs/remotes/origin" -v tgonly=1 >actual &&
504 test_cmp actual expected
507 test_expect_success 'preord option works' '
508 cat brlist135 hdlist135 >hdlist &&
509 cat anlist135 >anlist &&
510 echo "hd1" >>anlist &&
511 cat <<-EOT >graph &&
512 t/1 hd1
513 t/1 t/3
514 t/1 ann1
515 t/3 ann3
516 t/3 t/5
517 t/3 hd3
518 t/5 ann5
519 hd3 hd5
521 cat <<-EOT >expected &&
522 0 0 0 0 :refs/remotes/origin/t/1 t/1
523 0 1 2 0 hd1 t/1
524 0 0 0 0 :refs/remotes/origin/t/3 t/3 t/1
525 1 0 0 0 ann3 t/3 t/1
526 1 0 0 0 ann5 t/5 t/3 t/1
527 0 1 1 0 t/5 t/3 t/1
528 0 0 1 0 hd5 hd3 t/3 t/1
529 0 0 1 0 hd3 t/3 t/1
530 0 2 0 0 t/3 t/1
531 1 0 0 0 ann1 t/1
532 0 2 0 0 t/1
534 <graph tgrecurse "t/1" -v hdfile=hdlist -v brfile=brlist135 -v withbr=1 -v rtfile=rtlist13 -v usermt=:refs/remotes/origin/ -v anfile=anlist -v withan=1 >actual &&
535 test_cmp actual expected &&
536 cat <<-EOT >expected &&
537 0 2 0 0 t/1
538 0 0 0 0 :refs/remotes/origin/t/1 t/1
539 0 1 2 0 hd1 t/1
540 0 2 0 0 t/3 t/1
541 0 0 0 0 :refs/remotes/origin/t/3 t/3 t/1
542 1 0 0 0 ann3 t/3 t/1
543 0 1 1 0 t/5 t/3 t/1
544 1 0 0 0 ann5 t/5 t/3 t/1
545 0 0 1 0 hd3 t/3 t/1
546 0 0 1 0 hd5 hd3 t/3 t/1
547 1 0 0 0 ann1 t/1
549 <graph tgrecurse "t/1" -v hdfile=hdlist -v brfile=brlist135 -v withbr=1 -v rtfile=rtlist13 -v usermt=:refs/remotes/origin/ -v anfile=anlist -v withan=1 -v preord=1 >actual &&
550 test_cmp actual expected
553 test_expect_success 'startb with path works' '
554 cat brlist135 hdlist135 >hdlist &&
555 cat <<-EOT >graph &&
556 t/1 t/3
557 t/3 t/5
558 t/5 hd1
559 t/5 hd3
560 t/5 hd5
562 cat <<-EOT >expected &&
563 0 0 1 0 hd1 t/5 t/3 t/1
564 0 0 1 0 hd3 t/5 t/3 t/1
565 0 0 1 0 hd5 t/5 t/3 t/1
566 0 1 0 0 t/5 t/3 t/1
567 0 1 0 0 t/3 t/1
568 0 1 0 0 t/1
570 <graph tgrecurse "t/1" -v hdfile=hdlist -v brfile=brlist135 -v withbr=1 >actual &&
571 test_cmp actual expected &&
572 base="t/1" &&
573 for comp in a b/c d/e/f g/h/i/j; do
574 base="$base $comp" &&
575 sed <expected "s,\$, $comp," >expected2 &&
576 mv -f expected2 expected &&
577 <graph tgrecurse "$base" -v hdfile=hdlist -v brfile=brlist135 -v withbr=1 >actual &&
578 test_cmp actual expected || return
579 done
582 test_expect_success 'startb with multib works' '
583 cat brlist135 hdlist135 >hdlist &&
584 cat <<-EOT >graph &&
585 t/1 t/3
586 t/1 hd1
587 t/3 hd3
588 t/5 hd5
590 cat <<-EOT >expected &&
591 0 0 1 0 hd3 t/3 t/1
592 0 1 0 0 t/3 t/1
593 0 0 1 0 hd1 t/1
594 0 1 0 0 t/1
596 <graph tgrecurse -m "t/1" -v hdfile=hdlist -v brfile=brlist135 -v withbr=1 >actual &&
597 test_cmp actual expected &&
598 cat <<-EOT >expected &&
599 0 0 1 0 hd5 t/5
600 0 1 0 0 t/5
601 0 0 1 0 hd3 t/3
602 0 1 0 0 t/3
603 0 0 1 1 hd3 t/3 t/1
604 0 1 0 1 t/3 t/1
605 0 0 1 0 hd1 t/1
606 0 1 0 0 t/1
607 0 0 1 2 hd3 t/3
608 0 1 0 2 t/3
609 0 0 1 1 hd5 t/5
610 0 1 0 1 t/5
612 <graph tgrecurse -m2 "t/5 t/3 t/1 t/3 t/5" -v hdfile=hdlist -v brfile=brlist135 -v withbr=1 >actual &&
613 test_cmp actual expected &&
614 cat <<-EOT >expected &&
615 0 1 0 0 t/5
616 0 0 1 0 hd5 t/5
617 0 1 0 0 t/3
618 0 0 1 0 hd3 t/3
619 0 1 0 0 t/1
620 0 1 0 1 t/3 t/1
621 0 0 1 1 hd3 t/3 t/1
622 0 0 1 0 hd1 t/1
623 0 1 0 2 t/3
624 0 0 1 2 hd3 t/3
625 0 1 0 1 t/5
626 0 0 1 1 hd5 t/5
628 <graph tgrecurse -m2 "t/5 t/3 t/1 t/3 t/5" -v hdfile=hdlist -v brfile=brlist135 -v withbr=1 -v preord=1 >actual &&
629 test_cmp actual expected &&
630 cat <<-EOT >expected &&
631 0 0 1 0 hd5 t/5
632 0 1 0 0 t/5
633 0 0 1 0 hd3 t/3
634 0 1 0 0 t/3
635 0 0 1 1 hd3 t/3 t/1
636 0 1 0 1 t/3 t/1
637 0 0 1 0 hd1 t/1
638 0 1 0 0 t/1
640 <graph tgrecurse -m1 "t/5 t/3 t/1 t/3 t/5" -v hdfile=hdlist -v brfile=brlist135 -v withbr=1 >actual &&
641 test_cmp actual expected &&
642 cat <<-EOT >expected &&
643 0 1 0 0 t/5
644 0 0 1 0 hd5 t/5
645 0 1 0 0 t/3
646 0 0 1 0 hd3 t/3
647 0 1 0 0 t/1
648 0 1 0 1 t/3 t/1
649 0 0 1 1 hd3 t/3 t/1
650 0 0 1 0 hd1 t/1
652 <graph tgrecurse -m1 "t/5 t/3 t/1 t/3 t/5" -v hdfile=hdlist -v brfile=brlist135 -v withbr=1 -v preord=1 >actual &&
653 test_cmp actual expected
656 test_expect_success 'leaves only works' '
657 cat brlist135 >brlist &&
658 printf "%s\n" "t/7" "t/11" >>brlist &&
659 cat hdlist135 brlist anlist135 >hdlist &&
660 cat anlist135 >anlist &&
661 echo "t/5" >>anlist &&
662 echo "ann7" >>anlist &&
663 cat <<-EOT >>rtlist &&
669 t/11
671 cat <<-EOT >graph &&
672 t/1 t/3
673 t/1 hd1
674 t/1 ann1
675 t/3 t/5
676 t/3 ann3
677 t/3 ann5
678 t/3 hd3
679 t/5 ann7
680 t/5 hd5
681 t/5 hd7
683 cat <<-EOT >expected &&
684 0 1 1 0 t/7
685 0 0 1 0 hd3 t/3 t/1
686 0 0 1 0 hd1 t/1
687 0 2 1 0 t/11
689 <graph tgrecurse -m "t/7 t/1 t/11" -v hdfile=hdlist -v brfile=brlist -v withbr=1 -v anfile=anlist -v withan=1 -v leaves=1 -v rtfile=rtlist >actual &&
690 test_cmp actual expected &&
691 cat <<-EOT >expected &&
692 0 1 1 0 t/7
693 1 0 0 0 t/13
694 0 2 1 0 t/11
696 <graph tgrecurse -m "t/7 t/1 t/13 t/11" -v hdfile=hdlist -v brfile=brlist -v withbr=1 -v anfile=anlist -v withan=1 -v leaves=1 -v rtfile=rtlist -v tgonly=1 >actual &&
697 test_cmp actual expected
700 test_expect_success 'tgonly works' '
701 cat brlist1 hdlist1 >hdlist &&
702 echo "1 0 0 0 hd1" >expected &&
703 echo "1 0 0 0 t/1" >>expected &&
704 </dev/null tgrecurse -m "hd1 t/1" -v withbr=1 >actual &&
705 test_cmp actual expected &&
706 </dev/null tgrecurse -m "hd1 t/1" -v withbr=1 -v tgonly=1 >actual &&
707 test_cmp actual expected &&
708 </dev/null tgrecurse -m "hd1 t/1" -v withbr=1 -v tgonly=1 -v brfile=brlist1 >actual &&
709 test_cmp actual expected &&
710 >expected &&
711 </dev/null tgrecurse -m "hd1 t/1" -v withbr=1 -v tgonly=1 -v hdfile=hdlist >actual &&
712 test_cmp actual expected &&
713 echo "0 1 1 0 t/1" >expected &&
714 </dev/null tgrecurse -m "hd1 t/1" -v withbr=1 -v tgonly=1 -v hdfile=hdlist -v brfile=brlist1 >actual &&
715 test_cmp actual expected &&
716 printf "%s\n" "0 1 1 0 hd1" "0 1 1 0 t/1" >expected &&
717 </dev/null tgrecurse -m "hd1 t/1" -v withbr=1 -v tgonly=1 -v hdfile=hdlist -v brfile=hdlist >actual &&
718 test_cmp actual expected &&
719 echo "0 2 1 0 t/1" >expected &&
720 </dev/null tgrecurse -m "hd1 t/1" -v withbr=1 -v tgonly=1 -v hdfile=hdlist -v brfile=brlist1 -v rtfile=brlist1 >actual &&
721 test_cmp actual expected &&
722 echo "0 1 2 0 t/1" >expected &&
723 </dev/null tgrecurse -m "hd1 t/1" -v withbr=1 -v tgonly=1 -v hdfile=hdlist -v brfile=brlist1 -v rtfile=brlist1 -v withan=1 -v anfile=brlist1 >actual &&
724 test_cmp actual expected &&
725 echo "0 1 2 1 t/1" >>expected &&
726 </dev/null tgrecurse -m2 "t/1 hd1 t/1" -v withbr=1 -v tgonly=1 -v hdfile=hdlist -v brfile=brlist1 -v rtfile=brlist1 -v withan=1 -v anfile=brlist1 >actual &&
727 test_cmp actual expected
730 test_expect_success 'once only node' '
731 cat brlist135 >brlist &&
732 echo "t/7" >>brlist &&
733 cat brlist hdlist135 >hdlist &&
734 printf "%s\n" hd7 hd11 >>hdlist &&
735 cat <<-EOT >graph &&
736 t/1 t/3
737 t/1 t/7
738 t/1 hd1
739 t/3 t/5
740 t/3 t/7
741 t/3 hd3
742 t/5 hd5
743 t/5 t/7
744 t/7 hd7
745 t/7 hd11
747 cat <<-EOT >expected &&
748 0 1 0 0 t/1
749 0 1 0 0 t/3 t/1
750 0 1 0 0 t/5 t/3 t/1
751 0 0 1 0 hd5 t/5 t/3 t/1
752 0 1 0 0 t/7 t/5 t/3 t/1
753 0 0 1 0 hd7 t/7 t/5 t/3 t/1
754 0 0 1 0 hd11 t/7 t/5 t/3 t/1
755 0 1 0 1 t/7 t/3 t/1
756 0 0 1 1 hd7 t/7 t/3 t/1
757 0 0 1 1 hd11 t/7 t/3 t/1
758 0 0 1 0 hd3 t/3 t/1
759 0 1 0 2 t/7 t/1
760 0 0 1 2 hd7 t/7 t/1
761 0 0 1 2 hd11 t/7 t/1
762 0 0 1 0 hd1 t/1
764 <graph tgrecurse "t/1" -v withbr=1 -v preord=1 -v hdfile=hdlist -v brfile=brlist >actual &&
765 test_cmp actual expected &&
766 cat <<-EOT >expected &&
767 0 0 1 0 hd5 t/5 t/3 t/1
768 0 0 1 0 hd7 t/7 t/5 t/3 t/1
769 0 0 1 0 hd11 t/7 t/5 t/3 t/1
770 0 1 0 0 t/7 t/5 t/3 t/1
771 0 1 0 0 t/5 t/3 t/1
772 0 0 1 0 hd3 t/3 t/1
773 0 1 0 0 t/3 t/1
774 0 0 1 0 hd1 t/1
775 0 1 0 0 t/1
777 <graph tgrecurse "t/1" -v withbr=1 -v once=1 -v hdfile=hdlist -v brfile=brlist >actual &&
778 test_cmp actual expected &&
779 cat <<-EOT >expected &&
780 0 1 0 0 t/1
781 0 1 0 0 t/3 t/1
782 0 1 0 0 t/5 t/3 t/1
783 0 0 1 0 hd5 t/5 t/3 t/1
784 0 1 0 0 t/7 t/5 t/3 t/1
785 0 0 1 0 hd7 t/7 t/5 t/3 t/1
786 0 0 1 0 hd11 t/7 t/5 t/3 t/1
787 0 0 1 0 hd3 t/3 t/1
788 0 0 1 0 hd1 t/1
790 <graph tgrecurse "t/1" -v withbr=1 -v preord=1 -v once=1 -v hdfile=hdlist -v brfile=brlist >actual &&
791 test_cmp actual expected
794 test_expect_success 'once only node filter=2' '
795 cat brlist135 >brlist &&
796 echo "t/7" >>brlist &&
797 cat brlist hdlist135 >hdlist &&
798 printf "%s\n" hd7 hd11 >>hdlist &&
799 cat <<-EOT >graph &&
800 t/1 t/3
801 t/1 t/7
802 t/1 hd1
803 t/3 t/5
804 t/3 t/7
805 t/3 hd3
806 t/5 hd5
807 t/5 t/7
808 t/7 hd7
809 t/7 hd11
811 cat <<-EOT >expected &&
812 t/1 t/1
813 t/1 t/3
814 t/3 t/5
815 t/5 hd5
816 t/5 t/7
817 t/7 hd7
818 t/7 hd11
819 t/3 t/7
820 t/7 hd7
821 t/7 hd11
822 t/3 hd3
823 t/1 t/7
824 t/7 hd7
825 t/7 hd11
826 t/1 hd1
828 <graph tgrecurse "t/1" -v filter=2 -v withbr=1 -v preord=1 -v hdfile=hdlist -v brfile=brlist >actual &&
829 test_cmp actual expected &&
830 cat <<-EOT >expected &&
831 t/5 hd5
832 t/7 hd7
833 t/7 hd11
834 t/5 t/7
835 t/3 t/5
836 t/3 hd3
837 t/1 t/3
838 t/1 hd1
839 t/1 t/1
841 <graph tgrecurse "t/1" -v filter=2 -v withbr=1 -v once=1 -v hdfile=hdlist -v brfile=brlist >actual &&
842 test_cmp actual expected &&
843 cat <<-EOT >expected &&
844 t/1 t/1
845 t/1 t/3
846 t/3 t/5
847 t/5 hd5
848 t/5 t/7
849 t/7 hd7
850 t/7 hd11
851 t/3 hd3
852 t/1 hd1
854 <graph tgrecurse "t/1" -v filter=2 -v withbr=1 -v preord=1 -v once=1 -v hdfile=hdlist -v brfile=brlist >actual &&
855 test_cmp actual expected
858 test_expect_success 'once only node filter=1' '
859 cat brlist135 >brlist &&
860 echo "t/7" >>brlist &&
861 cat brlist hdlist135 >hdlist &&
862 printf "%s\n" hd7 hd11 >>hdlist &&
863 cat <<-EOT >graph &&
864 t/1 t/3
865 t/1 t/7
866 t/1 hd1
867 t/3 t/5
868 t/3 t/7
869 t/3 hd3
870 t/5 hd5
871 t/5 t/7
872 t/7 hd7
873 t/7 hd11
875 cat <<-EOT >expected &&
882 hd11
885 hd11
889 hd11
892 <graph tgrecurse "t/1" -v filter=1 -v withbr=1 -v preord=1 -v hdfile=hdlist -v brfile=brlist >actual &&
893 test_cmp actual expected &&
894 cat <<-EOT >expected &&
897 hd11
905 <graph tgrecurse "t/1" -v filter=1 -v withbr=1 -v once=1 -v hdfile=hdlist -v brfile=brlist >actual &&
906 test_cmp actual expected &&
907 cat <<-EOT >expected &&
914 hd11
918 <graph tgrecurse "t/1" -v filter=1 -v withbr=1 -v preord=1 -v once=1 -v hdfile=hdlist -v brfile=brlist >actual &&
919 test_cmp actual expected
922 test_expect_success 'once only deps' '
923 cat brlist135 >brlist &&
924 echo "t/7" >>brlist &&
925 cat brlist hdlist135 >hdlist &&
926 printf "%s\n" hd7 hd11 >>hdlist &&
927 cat <<-EOT >graph &&
928 t/1 t/3
929 t/1 t/7
930 t/1 hd1
931 t/3 t/5
932 t/3 t/7
933 t/3 hd3
934 t/5 hd5
935 t/5 t/7
936 t/7 hd7
937 t/7 hd11
939 cat <<-EOT >expected &&
940 0 0 1 0 hd5 t/5 t/3 t/1
941 0 0 1 0 hd7 t/7 t/5 t/3 t/1
942 0 0 1 0 hd11 t/7 t/5 t/3 t/1
943 0 1 0 0 t/7 t/5 t/3 t/1
944 0 1 0 0 t/5 t/3 t/1
945 0 0 1 1 hd7 t/7 t/3 t/1
946 0 0 1 1 hd11 t/7 t/3 t/1
947 0 1 0 1 t/7 t/3 t/1
948 0 0 1 0 hd3 t/3 t/1
949 0 1 0 0 t/3 t/1
950 0 0 1 2 hd7 t/7 t/1
951 0 0 1 2 hd11 t/7 t/1
952 0 1 0 2 t/7 t/1
953 0 0 1 0 hd1 t/1
954 0 1 0 0 t/1
956 <graph tgrecurse "t/1" -v withbr=1 -v hdfile=hdlist -v brfile=brlist >actual &&
957 test_cmp actual expected &&
958 cat <<-EOT >expected &&
959 0 0 1 0 hd5 t/5 t/3 t/1
960 0 0 1 0 hd7 t/7 t/5 t/3 t/1
961 0 0 1 0 hd11 t/7 t/5 t/3 t/1
962 0 1 0 0 t/7 t/5 t/3 t/1
963 0 1 0 0 t/5 t/3 t/1
964 0 1 0 1 t/7 t/3 t/1
965 0 0 1 0 hd3 t/3 t/1
966 0 1 0 0 t/3 t/1
967 0 1 0 2 t/7 t/1
968 0 0 1 0 hd1 t/1
969 0 1 0 0 t/1
971 <graph tgrecurse "t/1" -v withbr=1 -v once=-1 -v hdfile=hdlist -v brfile=brlist >actual &&
972 test_cmp actual expected &&
973 cat <<-EOT >expected &&
974 0 1 0 0 t/1
975 0 1 0 0 t/3 t/1
976 0 1 0 0 t/5 t/3 t/1
977 0 0 1 0 hd5 t/5 t/3 t/1
978 0 1 0 0 t/7 t/5 t/3 t/1
979 0 0 1 0 hd7 t/7 t/5 t/3 t/1
980 0 0 1 0 hd11 t/7 t/5 t/3 t/1
981 0 1 0 1 t/7 t/3 t/1
982 0 0 1 0 hd3 t/3 t/1
983 0 1 0 2 t/7 t/1
984 0 0 1 0 hd1 t/1
986 <graph tgrecurse "t/1" -v withbr=1 -v preord=1 -v once=-1 -v hdfile=hdlist -v brfile=brlist >actual &&
987 test_cmp actual expected
990 test_expect_success 'once only deps filter=2' '
991 cat brlist135 >brlist &&
992 echo "t/7" >>brlist &&
993 cat brlist hdlist135 >hdlist &&
994 printf "%s\n" hd7 hd11 >>hdlist &&
995 cat <<-EOT >graph &&
996 t/1 t/3
997 t/1 t/7
998 t/1 hd1
999 t/3 t/5
1000 t/3 t/7
1001 t/3 hd3
1002 t/5 hd5
1003 t/5 t/7
1004 t/7 hd7
1005 t/7 hd11
1007 cat <<-EOT >expected &&
1008 t/5 hd5
1009 t/7 hd7
1010 t/7 hd11
1011 t/5 t/7
1012 t/3 t/5
1013 t/7 hd7
1014 t/7 hd11
1015 t/3 t/7
1016 t/3 hd3
1017 t/1 t/3
1018 t/7 hd7
1019 t/7 hd11
1020 t/1 t/7
1021 t/1 hd1
1022 t/1 t/1
1024 <graph tgrecurse "t/1" -v filter=2 -v withbr=1 -v hdfile=hdlist -v brfile=brlist >actual &&
1025 test_cmp actual expected &&
1026 cat <<-EOT >expected &&
1027 t/5 hd5
1028 t/7 hd7
1029 t/7 hd11
1030 t/5 t/7
1031 t/3 t/5
1032 t/3 t/7
1033 t/3 hd3
1034 t/1 t/3
1035 t/1 t/7
1036 t/1 hd1
1037 t/1 t/1
1039 <graph tgrecurse "t/1" -v filter=2 -v withbr=1 -v once=-1 -v hdfile=hdlist -v brfile=brlist >actual &&
1040 test_cmp actual expected &&
1041 cat <<-EOT >expected &&
1042 t/1 t/1
1043 t/1 t/3
1044 t/3 t/5
1045 t/5 hd5
1046 t/5 t/7
1047 t/7 hd7
1048 t/7 hd11
1049 t/3 t/7
1050 t/3 hd3
1051 t/1 t/7
1052 t/1 hd1
1054 <graph tgrecurse "t/1" -v filter=2 -v withbr=1 -v preord=1 -v once=-1 -v hdfile=hdlist -v brfile=brlist >actual &&
1055 test_cmp actual expected
1058 test_expect_success 'once only deps filter=1' '
1059 cat brlist135 >brlist &&
1060 echo "t/7" >>brlist &&
1061 cat brlist hdlist135 >hdlist &&
1062 printf "%s\n" hd7 hd11 >>hdlist &&
1063 cat <<-EOT >graph &&
1064 t/1 t/3
1065 t/1 t/7
1066 t/1 hd1
1067 t/3 t/5
1068 t/3 t/7
1069 t/3 hd3
1070 t/5 hd5
1071 t/5 t/7
1072 t/7 hd7
1073 t/7 hd11
1075 cat <<-EOT >expected &&
1078 hd11
1082 hd11
1087 hd11
1092 <graph tgrecurse "t/1" -v filter=1 -v withbr=1 -v hdfile=hdlist -v brfile=brlist >actual &&
1093 test_cmp actual expected &&
1094 cat <<-EOT >expected &&
1097 hd11
1107 <graph tgrecurse "t/1" -v filter=1 -v withbr=1 -v once=-1 -v hdfile=hdlist -v brfile=brlist >actual &&
1108 test_cmp actual expected &&
1109 cat <<-EOT >expected &&
1116 hd11
1122 <graph tgrecurse "t/1" -v filter=1 -v withbr=1 -v preord=1 -v once=-1 -v hdfile=hdlist -v brfile=brlist >actual &&
1123 test_cmp actual expected
1126 test_expect_success 'filter=0' '
1127 cat brlist135 hdlist135 >hdlist &&
1128 cat anlist135 >anlist &&
1129 echo "hd1" >>anlist &&
1130 cat <<-EOT >graph &&
1131 t/1 hd1
1132 t/1 t/3
1133 t/1 ann1
1134 t/3 ann3
1135 t/3 t/1
1136 t/3 t/5
1137 t/3 hd3
1138 t/5 ann5
1139 hd3 hd5
1141 cat <<-EOT >expected &&
1142 0 0 0 0 :refs/remotes/origin/t/1 t/1
1143 0 1 2 0 hd1 t/1
1144 0 0 0 0 :refs/remotes/origin/t/3 t/3 t/1
1145 1 0 0 0 ann3 t/3 t/1
1146 :loop: t/1 t/3 t/1
1147 1 0 0 0 ann5 t/5 t/3 t/1
1148 0 1 1 0 t/5 t/3 t/1
1149 0 0 1 0 hd5 hd3 t/3 t/1
1150 0 0 1 0 hd3 t/3 t/1
1151 0 2 0 0 t/3 t/1
1152 1 0 0 0 ann1 t/1
1153 0 2 0 0 t/1
1155 <graph tgrecurse "t/1" -v filter=0 -v hdfile=hdlist -v brfile=brlist135 -v withbr=1 -v rtfile=rtlist13 -v usermt=:refs/remotes/origin/ -v anfile=anlist -v withan=1 -v showlp=1 >actual &&
1156 test_cmp actual expected &&
1157 cat <<-EOT >expected &&
1158 0 1 2 0 hd1 t/1
1159 1 0 0 0 ann3 t/3 t/1
1160 :loop: t/1 t/3 t/1
1161 1 0 0 0 ann5 t/5 t/3 t/1
1162 0 1 1 0 t/5 t/3 t/1
1163 0 2 0 0 t/3 t/1
1164 1 0 0 0 ann1 t/1
1165 0 2 0 0 t/1
1167 <graph tgrecurse "t/1" -v filter=0 -v tgonly=1 -v hdfile=hdlist -v brfile=brlist135 -v withbr=1 -v rtfile=rtlist13 -v usermt=:refs/remotes/origin/ -v anfile=anlist -v withan=1 -v showlp=1 >actual &&
1168 test_cmp actual expected &&
1169 cat <<-EOT >expected &&
1170 1 0 0 0 ann3 t/3 t/1
1171 :loop: t/1 t/3 t/1
1172 1 0 0 0 ann5 t/5 t/3 t/1
1173 0 1 1 0 t/5 t/3 t/1
1174 0 0 1 0 hd5 hd3 t/3 t/1
1175 0 0 1 0 hd3 t/3 t/1
1176 1 0 0 0 ann1 t/1
1178 <graph tgrecurse "t/1" -v filter=0 -v leaves=1 -v hdfile=hdlist -v brfile=brlist135 -v withbr=1 -v rtfile=rtlist13 -v usermt=:refs/remotes/origin/ -v anfile=anlist -v withan=1 -v showlp=1 >actual &&
1179 test_cmp actual expected &&
1180 cat <<-EOT >expected &&
1181 1 0 0 0 ann3 t/3 t/1
1182 :loop: t/1 t/3 t/1
1183 1 0 0 0 ann5 t/5 t/3 t/1
1184 0 1 1 0 t/5 t/3 t/1
1185 1 0 0 0 ann1 t/1
1187 <graph tgrecurse "t/1" -v filter=0 -v tgonly=1 -v leaves=1 -v hdfile=hdlist -v brfile=brlist135 -v withbr=1 -v rtfile=rtlist13 -v usermt=:refs/remotes/origin/ -v anfile=anlist -v withan=1 -v showlp=1 >actual &&
1188 test_cmp actual expected
1191 test_expect_success 'filter=2' '
1192 cat brlist135 hdlist135 >hdlist &&
1193 cat anlist135 >anlist &&
1194 echo "hd1" >>anlist &&
1195 cat <<-EOT >graph &&
1196 t/1 hd1
1197 t/1 t/3
1198 t/1 ann1
1199 t/3 ann3
1200 t/3 t/1
1201 t/3 t/5
1202 t/3 hd3
1203 t/5 ann5
1204 hd3 hd5
1206 cat <<-EOT >expected &&
1207 t/1 hd1
1208 :loop: t/1 t/3 t/1
1209 t/3 t/5
1210 hd3 hd5
1211 t/3 hd3
1212 t/1 t/3
1213 t/1 t/1
1215 <graph tgrecurse "t/1" -v filter=2 -v hdfile=hdlist -v brfile=brlist135 -v withbr=1 -v rtfile=rtlist13 -v usermt=:refs/remotes/origin/ -v anfile=anlist -v withan=1 -v showlp=1 >actual &&
1216 test_cmp actual expected &&
1217 cat <<-EOT >expected &&
1218 t/1 hd1
1219 :loop: t/1 t/3 t/1
1220 t/3 t/5
1221 t/1 t/3
1222 t/1 t/1
1224 <graph tgrecurse "t/1" -v filter=2 -v tgonly=1 -v hdfile=hdlist -v brfile=brlist135 -v withbr=1 -v rtfile=rtlist13 -v usermt=:refs/remotes/origin/ -v anfile=anlist -v withan=1 -v showlp=1 >actual &&
1225 test_cmp actual expected &&
1226 cat <<-EOT >expected &&
1227 :loop: t/1 t/3 t/1
1228 t/3 t/5
1229 hd3 hd5
1230 t/3 hd3
1232 <graph tgrecurse "t/1" -v filter=2 -v leaves=1 -v hdfile=hdlist -v brfile=brlist135 -v withbr=1 -v rtfile=rtlist13 -v usermt=:refs/remotes/origin/ -v anfile=anlist -v withan=1 -v showlp=1 >actual &&
1233 test_cmp actual expected &&
1234 cat <<-EOT >expected &&
1235 :loop: t/1 t/3 t/1
1236 t/3 t/5
1238 <graph tgrecurse "t/1" -v filter=2 -v tgonly=1 -v leaves=1 -v hdfile=hdlist -v brfile=brlist135 -v withbr=1 -v rtfile=rtlist13 -v usermt=:refs/remotes/origin/ -v anfile=anlist -v withan=1 -v showlp=1 >actual &&
1239 test_cmp actual expected
1242 test_expect_success 'filter=1' '
1243 cat brlist135 hdlist135 >hdlist &&
1244 cat anlist135 >anlist &&
1245 echo "hd1" >>anlist &&
1246 cat <<-EOT >graph &&
1247 t/1 hd1
1248 t/1 t/3
1249 t/1 ann1
1250 t/3 ann3
1251 t/3 t/1
1252 t/3 t/5
1253 t/3 hd3
1254 t/5 ann5
1255 hd3 hd5
1257 cat <<-EOT >expected &&
1259 :loop: t/1 t/3 t/1
1266 <graph tgrecurse "t/1" -v filter=1 -v hdfile=hdlist -v brfile=brlist135 -v withbr=1 -v rtfile=rtlist13 -v usermt=:refs/remotes/origin/ -v anfile=anlist -v withan=1 -v showlp=1 >actual &&
1267 test_cmp actual expected &&
1268 cat <<-EOT >expected &&
1270 :loop: t/1 t/3 t/1
1275 <graph tgrecurse "t/1" -v filter=1 -v tgonly=1 -v hdfile=hdlist -v brfile=brlist135 -v withbr=1 -v rtfile=rtlist13 -v usermt=:refs/remotes/origin/ -v anfile=anlist -v withan=1 -v showlp=1 >actual &&
1276 test_cmp actual expected &&
1277 cat <<-EOT >expected &&
1278 :loop: t/1 t/3 t/1
1283 <graph tgrecurse "t/1" -v filter=1 -v leaves=1 -v hdfile=hdlist -v brfile=brlist135 -v withbr=1 -v rtfile=rtlist13 -v usermt=:refs/remotes/origin/ -v anfile=anlist -v withan=1 -v showlp=1 >actual &&
1284 test_cmp actual expected &&
1285 cat <<-EOT >expected &&
1286 :loop: t/1 t/3 t/1
1289 <graph tgrecurse "t/1" -v filter=1 -v tgonly=1 -v leaves=1 -v hdfile=hdlist -v brfile=brlist135 -v withbr=1 -v rtfile=rtlist13 -v usermt=:refs/remotes/origin/ -v anfile=anlist -v withan=1 -v showlp=1 >actual &&
1290 test_cmp actual expected
1293 test_expect_success 'filter with path' '
1294 cat <<-EOT >graph &&
1295 t/1 t/3
1296 t/3 t/5
1298 cat <<-EOT >expected &&
1299 t/3 t/5
1300 t/1 t/3
1302 <graph tgrecurse "t/1 extra path" -v filter=2 -v hdfile=brlist135 -v brfile=brlist135 >actual &&
1303 test_cmp actual expected &&
1304 printf "%s\n" "t/5" "t/3" >expected &&
1305 <graph tgrecurse "t/1 extra path" -v filter=1 -v hdfile=brlist135 -v brfile=brlist135 >actual &&
1306 test_cmp actual expected
1309 test_expect_success 'filter with multib' '
1310 cat <<-EOT >graph &&
1311 t/1 t/3
1312 t/3 t/5
1314 cat <<-EOT >expected &&
1315 t/3 t/5
1316 t/3 t/5
1317 t/1 t/3
1319 <graph tgrecurse -m "t/3 t/1" -v filter=2 -v hdfile=brlist135 -v brfile=brlist135 >actual &&
1320 test_cmp actual expected &&
1321 printf "%s\n" "t/5" "t/5" "t/3" >expected &&
1322 <graph tgrecurse -m "t/3 t/1" -v filter=1 -v hdfile=brlist135 -v brfile=brlist135 >actual &&
1323 test_cmp actual expected
1326 test_expect_success 'loop detection' '
1327 cat <<-EOT >graph &&
1328 t/1 t/3
1329 t/3 t/1
1330 t/3 t/5
1331 t/5 t/1
1332 t/5 t/3
1334 cat <<-EOT >expected &&
1335 :loop: t/1 t/3 t/1
1336 :loop: t/1 t/5 t/3 t/1
1337 :loop: t/3 t/5 t/3 t/1
1339 <graph tgrecurse "t/1" -v leaves=1 -v showlp=1 -v hdfile=brlist135 -v brfile=brlist135 >actual &&
1340 test_cmp actual expected &&
1341 <graph tgrecurse "t/1" -v preord=1 -v leaves=1 -v showlp=1 -v hdfile=brlist135 -v brfile=brlist135 >actual &&
1342 test_cmp actual expected &&
1343 <graph tgrecurse "t/1" -v filter=2 -v leaves=1 -v showlp=1 -v hdfile=brlist135 -v brfile=brlist135 >actual &&
1344 test_cmp actual expected &&
1345 <graph tgrecurse "t/1" -v preord=1 -v filter=2 -v leaves=1 -v showlp=1 -v hdfile=brlist135 -v brfile=brlist135 >actual &&
1346 test_cmp actual expected &&
1347 <graph tgrecurse "t/1" -v filter=1 -v leaves=1 -v showlp=1 -v hdfile=brlist135 -v brfile=brlist135 >actual &&
1348 test_cmp actual expected &&
1349 <graph tgrecurse "t/1" -v preord=1 -v filter=1 -v leaves=1 -v showlp=1 -v hdfile=brlist135 -v brfile=brlist135 >actual &&
1350 test_cmp actual expected
1353 test_expect_success 'inclbr' '
1354 cat brlist135 - <<-EOT >brlist &&
1363 cat brlist hdlist135 - <<-EOT >hdlist &&
1371 cat <<-EOT >graph &&
1372 t/1 t/2
1373 t/1 hd1
1374 t/1 t/4
1375 t/2 hd2
1376 t/2 t/3
1377 t/4 t/5
1378 t/4 hd4
1379 t/3 t/6
1380 t/3 hd3
1381 t/3 t/7
1382 t/5 t/8
1383 t/5 hd5
1384 t/5 t/9
1385 t/6 hd6
1386 t/7 hd7
1387 t/8 hd8
1388 t/9 hd9
1389 t/A t/1
1391 dotgr() { <graph tgrecurse_ -v hdfile=hdlist -v brfile=brlist -v withbr=1 \
1392 -v startb="$@"; } &&
1393 cat <<-EOT >expected &&
1394 0 1 1 0 t/1 t/A
1395 0 1 0 0 t/A
1397 dotgr "t/A" -v inclbr="t/A" >actual &&
1398 test_cmp actual expected &&
1399 cat <<-EOT >expected &&
1400 0 1 0 0 t/A
1401 0 1 1 0 t/1 t/A
1403 dotgr "t/A" -v preord=1 -v inclbr="t/A" >actual &&
1404 test_cmp actual expected &&
1405 printf "%s\n" "t/A t/1" "t/A t/A" >expected &&
1406 dotgr "t/A" -v inclbr="t/A" -v filter=2 >actual &&
1407 test_cmp actual expected &&
1408 printf "%s\n" "t/A t/A" "t/A t/1" >expected &&
1409 dotgr "t/A" -v preord=1 -v inclbr="t/A" -v filter=2 >actual &&
1410 test_cmp actual expected &&
1411 printf "%s\n" "t/1" "t/A" >expected &&
1412 dotgr "t/A" -v inclbr="t/A" -v filter=1 >actual &&
1413 test_cmp actual expected &&
1414 printf "%s\n" "t/A" "t/1" >expected &&
1415 dotgr "t/A" -v preord=1 -v inclbr="t/A" -v filter=1 >actual &&
1416 test_cmp actual expected &&
1417 cat <<-EOT >expected &&
1418 0 1 1 0 t/2 t/1 t/A
1419 0 0 1 0 hd1 t/1 t/A
1420 0 1 1 0 t/4 t/1 t/A
1421 0 1 0 0 t/1 t/A
1423 dotgr "t/A" -v inclbr="t/1" >actual &&
1424 test_cmp actual expected &&
1425 cat <<-EOT >expected &&
1426 0 1 0 0 t/1 t/A
1427 0 1 1 0 t/2 t/1 t/A
1428 0 0 1 0 hd1 t/1 t/A
1429 0 1 1 0 t/4 t/1 t/A
1431 dotgr "t/A" -v preord=1 -v inclbr="t/1" >actual &&
1432 test_cmp actual expected &&
1433 cat <<-EOT >expected &&
1434 t/1 t/2
1435 t/1 hd1
1436 t/1 t/4
1437 t/A t/1
1439 dotgr "t/A" -v inclbr="t/1" -v filter=2 >actual &&
1440 test_cmp actual expected &&
1441 cat <<-EOT >expected &&
1442 t/A t/1
1443 t/1 t/2
1444 t/1 hd1
1445 t/1 t/4
1447 dotgr "t/A" -v preord=1 -v inclbr="t/1" -v filter=2 >actual &&
1448 test_cmp actual expected &&
1449 printf "%s\n" "t/2" "hd1" "t/4" "t/1" >expected &&
1450 dotgr "t/A" -v inclbr="t/1" -v filter=1 >actual &&
1451 test_cmp actual expected &&
1452 printf "%s\n" "t/1" "t/2" "hd1" "t/4" >expected &&
1453 dotgr "t/A" -v preord=1 -v inclbr="t/1" -v filter=1 >actual &&
1454 test_cmp actual expected &&
1455 cat <<-EOT >expected &&
1456 t/A t/1
1457 t/1 t/2
1458 t/1 hd1
1459 t/1 t/4
1460 t/4 t/5
1461 t/5 t/8
1462 t/5 hd5
1463 t/5 t/9
1465 dotgr "t/A" -v preord=1 -v inclbr="t/5 t/1" -v filter=2 >actual &&
1466 test_cmp actual expected &&
1467 cat <<-EOT >expected &&
1468 t/1 t/2
1469 t/2 hd2
1470 t/2 t/3
1471 t/3 t/6
1472 t/3 hd3
1473 t/3 t/7
1475 dotgr "t/1" -v preord=1 -v inclbr="t/2 t/3" -v filter=2 >actual &&
1476 test_cmp actual expected &&
1477 cat <<-EOT >expected &&
1478 t/3 t/6
1479 t/6 hd6
1480 t/3 t/7
1481 t/7 hd7
1482 t/5 t/8
1483 t/8 hd8
1484 t/5 t/9
1485 t/9 hd9
1487 dotgr "t/3 t/5" -v multib=1 -v preord=1 -v inclbr="t/6 t/7 t/8 t/9" -v filter=2 >actual &&
1488 test_cmp actual expected
1491 test_expect_success 'exclbr' '
1492 cat brlist135 - <<-EOT >brlist &&
1501 cat brlist hdlist135 - <<-EOT >hdlist &&
1509 cat <<-EOT >graph &&
1510 t/1 t/2
1511 t/1 hd1
1512 t/1 t/4
1513 t/2 hd2
1514 t/2 t/3
1515 t/4 t/5
1516 t/4 hd4
1517 t/3 t/6
1518 t/3 hd3
1519 t/3 t/7
1520 t/5 t/8
1521 t/5 hd5
1522 t/5 t/9
1523 t/6 hd6
1524 t/7 hd7
1525 t/8 hd8
1526 t/9 hd9
1527 t/A t/1
1529 dotgr() { <graph tgrecurse_ -v hdfile=hdlist -v brfile=brlist -v withbr=1 \
1530 -v startb="$@"; } &&
1531 >expected &&
1532 dotgr "t/A" -v exclbr="t/A" >actual &&
1533 test_cmp actual expected &&
1534 dotgr "t/A" -v preord=1 -v exclbr="t/A" >actual &&
1535 test_cmp actual expected &&
1536 dotgr "t/A" -v exclbr="t/A -v filter=2" >actual &&
1537 test_cmp actual expected &&
1538 dotgr "t/A" -v preord=1 -v exclbr="t/A -v filter=2" >actual &&
1539 test_cmp actual expected &&
1540 dotgr "t/A" -v exclbr="t/A" -v filter=1 >actual &&
1541 test_cmp actual expected &&
1542 dotgr "t/A" -v preord=1 -v exclbr="t/A" -v filter=1 >actual &&
1543 test_cmp actual expected &&
1544 echo "0 1 1 0 t/A" >expected &&
1545 dotgr "t/A" -v exclbr="t/1" >actual &&
1546 test_cmp actual expected &&
1547 dotgr "t/A" -v preord=1 -v exclbr="t/1" >actual &&
1548 test_cmp actual expected &&
1549 echo "t/A t/A" >expected &&
1550 dotgr "t/A" -v exclbr="t/1" -v filter=2 >actual &&
1551 test_cmp actual expected &&
1552 dotgr "t/A" -v preord=1 -v exclbr="t/1" -v filter=2 >actual &&
1553 test_cmp actual expected &&
1554 echo "t/A" >expected &&
1555 dotgr "t/A" -v exclbr="t/1" -v filter=1 >actual &&
1556 test_cmp actual expected &&
1557 dotgr "t/A" -v preord=1 -v exclbr="t/1" -v filter=1 >actual &&
1558 test_cmp actual expected &&
1559 cat <<-EOT >expected &&
1560 0 0 1 0 hd1 t/1 t/A
1561 0 1 0 0 t/1 t/A
1562 0 1 0 0 t/A
1564 dotgr "t/A" -v exclbr="t/4 t/2" >actual &&
1565 test_cmp actual expected &&
1566 cat <<-EOT >expected &&
1567 0 1 0 0 t/A
1568 0 1 0 0 t/1 t/A
1569 0 0 1 0 hd1 t/1 t/A
1571 dotgr "t/A" -v preord=1 -v exclbr="t/4 t/2" >actual &&
1572 test_cmp actual expected &&
1573 cat <<-EOT >expected &&
1574 t/1 hd1
1575 t/A t/1
1576 t/A t/A
1578 dotgr "t/A" -v exclbr="t/4 t/2" -v filter=2 >actual &&
1579 test_cmp actual expected &&
1580 cat <<-EOT >expected &&
1581 t/A t/A
1582 t/A t/1
1583 t/1 hd1
1585 dotgr "t/A" -v preord=1 -v exclbr="t/4 t/2" -v filter=2 >actual &&
1586 test_cmp actual expected &&
1587 printf "%s\n" "hd1" "t/1" "t/A" >expected &&
1588 dotgr "t/A" -v exclbr="t/4 t/2" -v filter=1 >actual &&
1589 test_cmp actual expected &&
1590 printf "%s\n" "t/A" "t/1" "hd1" >expected &&
1591 dotgr "t/A" -v preord=1 -v exclbr="t/4 t/2" -v filter=1 >actual &&
1592 test_cmp actual expected &&
1593 cat <<-EOT >expected &&
1594 0 1 1 0 t/6 t/3
1595 0 1 1 0 t/7 t/3
1596 0 1 0 0 t/3
1597 0 1 1 0 t/8 t/5
1598 0 1 1 0 t/9 t/5
1599 0 1 0 0 t/5
1601 dotgr "t/3 t/5" -v multib=1 -v exclbr="hd3 hd5 hd6 hd7 hd8 hd9" >actual &&
1602 test_cmp actual expected &&
1603 cat <<-EOT >expected &&
1604 0 1 0 0 t/3
1605 0 1 1 0 t/6 t/3
1606 0 1 1 0 t/7 t/3
1607 0 1 0 0 t/5
1608 0 1 1 0 t/8 t/5
1609 0 1 1 0 t/9 t/5
1611 dotgr "t/3 t/5" -v multib=1 -v preord=1 -v exclbr="hd3 hd5 hd6 hd7 hd8 hd9" >actual &&
1612 test_cmp actual expected &&
1613 cat <<-EOT >expected &&
1614 t/3 t/6
1615 t/3 t/7
1616 t/3 t/3
1617 t/5 t/8
1618 t/5 t/9
1619 t/5 t/5
1621 dotgr "t/3 t/5" -v multib=1 -v exclbr="hd3 hd5 hd6 hd7 hd8 hd9" -v filter=2 >actual &&
1622 test_cmp actual expected &&
1623 cat <<-EOT >expected &&
1624 t/3 t/3
1625 t/3 t/6
1626 t/3 t/7
1627 t/5 t/5
1628 t/5 t/8
1629 t/5 t/9
1631 dotgr "t/3 t/5" -v multib=1 -v preord=1 -v exclbr="hd3 hd5 hd6 hd7 hd8 hd9" -v filter=2 >actual &&
1632 test_cmp actual expected &&
1633 printf "%s\n" "t/6" "t/7" "t/3" "t/8" "t/9" "t/5" >expected &&
1634 dotgr "t/3 t/5" -v multib=1 -v exclbr="hd3 hd5 hd6 hd7 hd8 hd9" -v filter=1 >actual &&
1635 test_cmp actual expected &&
1636 printf "%s\n" "t/3" "t/6" "t/7" "t/5" "t/8" "t/9" >expected &&
1637 dotgr "t/3 t/5" -v multib=1 -v preord=1 -v exclbr="hd3 hd5 hd6 hd7 hd8 hd9" -v filter=1 >actual &&
1638 test_cmp actual expected
1641 test_expect_success 'inclbr + exclbr' '
1642 cat brlist135 - <<-EOT >brlist &&
1651 cat brlist hdlist135 - <<-EOT >hdlist &&
1659 cat <<-EOT >graph &&
1660 t/1 t/2
1661 t/1 hd1
1662 t/1 t/4
1663 t/2 hd2
1664 t/2 t/3
1665 t/4 t/5
1666 t/4 hd4
1667 t/3 t/6
1668 t/3 hd3
1669 t/3 t/7
1670 t/5 t/8
1671 t/5 hd5
1672 t/5 t/9
1673 t/6 hd6
1674 t/7 hd7
1675 t/8 hd8
1676 t/9 hd9
1677 t/A t/1
1679 dotgr() { <graph tgrecurse_ -v hdfile=hdlist -v brfile=brlist -v withbr=1 \
1680 -v startb="$@"; } &&
1681 >expected &&
1682 dotgr "t/A" -v exclbr="t/A" -v inclbr="t/A" >actual &&
1683 test_cmp actual expected &&
1684 dotgr "t/A" -v preord=1 -v exclbr="t/A" -v inclbr="t/A" >actual &&
1685 test_cmp actual expected &&
1686 dotgr "t/A" -v exclbr="t/A -v filter=2" -v inclbr="t/A" >actual &&
1687 test_cmp actual expected &&
1688 dotgr "t/A" -v preord=1 -v exclbr="t/A -v inclbr="t/A" -v filter=2" >actual &&
1689 test_cmp actual expected &&
1690 dotgr "t/A" -v exclbr="t/A" -v inclbr="t/A" -v filter=1 >actual &&
1691 test_cmp actual expected &&
1692 dotgr "t/A" -v preord=1 -v exclbr="t/A" -v inclbr="t/A" -v filter=1 >actual &&
1693 test_cmp actual expected &&
1694 dotgr "t/A" -v exclbr="t/1" -v inclbr="t/1" >actual &&
1695 test_cmp actual expected &&
1696 dotgr "t/A" -v preord=1 -v exclbr="t/1" -v inclbr="t/1" >actual &&
1697 test_cmp actual expected &&
1698 dotgr "t/A" -v exclbr="t/1" -v inclbr="t/1" -v filter=2 >actual &&
1699 test_cmp actual expected &&
1700 dotgr "t/A" -v preord=1 -v exclbr="t/1" -v inclbr="t/1" -v filter=2 >actual &&
1701 test_cmp actual expected &&
1702 dotgr "t/A" -v exclbr="t/1" -v inclbr="t/1" -v filter=1 >actual &&
1703 test_cmp actual expected &&
1704 dotgr "t/A" -v preord=1 -v exclbr="t/1" -v inclbr="t/1" -v filter=1 >actual &&
1705 test_cmp actual expected &&
1706 cat <<-EOT >expected &&
1707 0 1 1 0 t/6 t/3
1708 0 0 1 0 hd3 t/3
1709 0 1 0 0 t/3
1710 0 0 1 0 hd5 t/5
1711 0 1 1 0 t/9 t/5
1712 0 1 0 0 t/5
1714 dotgr "t/3 t/5" -v multib=1 -v exclbr="t/7 t/8" -v inclbr="t/3 t/5" >actual &&
1715 test_cmp actual expected &&
1716 cat <<-EOT >expected &&
1717 0 1 0 0 t/3
1718 0 1 1 0 t/6 t/3
1719 0 0 1 0 hd3 t/3
1720 0 1 0 0 t/5
1721 0 0 1 0 hd5 t/5
1722 0 1 1 0 t/9 t/5
1724 dotgr "t/3 t/5" -v multib=1 -v preord=1 -v exclbr="t/7 t/8" -v inclbr="t/3 t/5" >actual &&
1725 test_cmp actual expected &&
1726 cat <<-EOT >expected &&
1727 t/3 t/6
1728 t/3 hd3
1729 t/3 t/3
1730 t/5 hd5
1731 t/5 t/9
1732 t/5 t/5
1734 dotgr "t/3 t/5" -v multib=1 -v exclbr="t/7 t/8" -v inclbr="t/3 t/5" -v filter=2 >actual &&
1735 test_cmp actual expected &&
1736 cat <<-EOT >expected &&
1737 t/3 t/3
1738 t/3 t/6
1739 t/3 hd3
1740 t/5 t/5
1741 t/5 hd5
1742 t/5 t/9
1744 dotgr "t/3 t/5" -v multib=1 -v preord=1 -v exclbr="t/7 t/8" -v inclbr="t/3 t/5" -v filter=2 >actual &&
1745 test_cmp actual expected &&
1746 printf "%s\n" "t/6" "hd3" "t/3" "hd5" "t/9" "t/5" >expected &&
1747 dotgr "t/3 t/5" -v multib=1 -v exclbr="t/7 t/8" -v inclbr="t/3 t/5" -v filter=1 >actual &&
1748 test_cmp actual expected &&
1749 printf "%s\n" "t/3" "t/6" "hd3" "t/5" "hd5" "t/9" >expected &&
1750 dotgr "t/3 t/5" -v multib=1 -v preord=1 -v exclbr="t/7 t/8" -v inclbr="t/3 t/5" -v filter=1 >actual &&
1751 test_cmp actual expected
1754 test_done