3 test_description
='topgit_recurse.awk functionality'
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:
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.
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" "$@"; }
59 case "$1" in "-m"|
"-m"[0-9]|
"-m"[0-9][0-9])
64 test x
"$1" != x || die
'tgrecurse requires non-empty arg 1 (startb)'
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
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' '
83 test ! -e no-such-file &&
85 </dev/null test_must_fail tgrecursemt -v brfile=no-such-file >actual &&
86 test_cmp actual expected &&
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' '
95 test ! -e no-such-file &&
97 </dev/null test_must_fail tgrecursemt -v anfile=no-such-file >actual &&
98 test_cmp actual expected &&
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 &&
109 </dev/null test_must_fail tgrecursemt -v hdfile=no-such-file >actual &&
110 test_cmp actual expected &&
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 &&
121 </dev/null tgrecursemt -v rtfile=no-such-file >actual &&
122 test_cmp actual expected &&
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 &&
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 &&
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 &&
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 &&
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 &&
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 &&
193 </dev/null tgrecursemt -v brfile=brfile -v rmbr=1 >actual &&
194 test_cmp actual expected &&
196 cat brorig >brfile &&
197 echo "..." | tgrecursemt -v brfile=brfile -v rmbr=1 >actual &&
198 test_cmp actual expected &&
202 test_expect_success
'anfile removed with rman' '
203 echo "an file here" >anorig &&
204 cat anorig >anfile &&
206 </dev/null tgrecursemt -v anfile=anfile -v rman=1 >actual &&
207 test_cmp actual expected &&
209 cat anorig >anfile &&
210 echo "..." | tgrecursemt -v anfile=anfile -v rman=1 >actual &&
211 test_cmp actual expected &&
215 test_expect_success
'hdfile removed with rmhd' '
216 echo "hd file here" >hdorig &&
217 cat hdorig >hdfile &&
219 </dev/null tgrecursemt -v hdfile=hdfile -v rmhd=1 >actual &&
220 test_cmp actual expected &&
222 cat hdorig >hdfile &&
223 echo "..." | tgrecursemt -v hdfile=hdfile -v rmhd=1 >actual &&
224 test_cmp actual expected &&
228 test_expect_success
'rtfile removed with rmrt' '
229 echo "rt file here" >rtorig &&
230 cat rtorig >rtfile &&
232 </dev/null tgrecursemt -v rtfile=rtfile -v rmrt=1 >actual &&
233 test_cmp actual expected &&
235 cat rtorig >rtfile &&
236 echo "..." | tgrecursemt -v rtfile=rtfile -v rmrt=1 >actual &&
237 test_cmp actual expected &&
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 &&
244 cat rtorig >rtfile &&
245 echo "..." | tgrecurse "none" -v rtfile=rtfile -v rmrt=1 >actual &&
246 test_cmp actual expected &&
250 test_expect_success
'hdfile works' '
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' '
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 &&
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 &&
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 &&
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 &&
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 &&
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
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 &&
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 &&
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 &&
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 &&
427 cat <<-EOT >expected &&
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 &&
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
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
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
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
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 &&
521 cat <<-EOT >expected &&
522 0 0 0 0 :refs/remotes/origin/t/1 t/1
524 0 0 0 0 :refs/remotes/origin/t/3 t/3 t/1
526 1 0 0 0 ann5 t/5 t/3 t/1
528 0 0 1 0 hd5 hd3 t/3 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 &&
538 0 0 0 0 :refs/remotes/origin/t/1 t/1
541 0 0 0 0 :refs/remotes/origin/t/3 t/3 t/1
544 1 0 0 0 ann5 t/5 t/3 t/1
546 0 0 1 0 hd5 hd3 t/3 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 &&
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
570 <graph tgrecurse "t/1" -v hdfile=hdlist -v brfile=brlist135 -v withbr=1 >actual &&
571 test_cmp actual expected &&
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
582 test_expect_success
'startb with multib works' '
583 cat brlist135 hdlist135 >hdlist &&
590 cat <<-EOT >expected &&
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 &&
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 &&
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 &&
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 &&
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 &&
683 cat <<-EOT >expected &&
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 &&
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 &&
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 &&
747 cat <<-EOT >expected &&
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
756 0 0 1 1 hd7 t/7 t/3 t/1
757 0 0 1 1 hd11 t/7 t/3 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
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 &&
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
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 &&
811 cat <<-EOT >expected &&
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 &&
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 &&
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 &&
875 cat <<-EOT >expected &&
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 &&
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 &&
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 &&
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
945 0 0 1 1 hd7 t/7 t/3 t/1
946 0 0 1 1 hd11 t/7 t/3 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
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 &&
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
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 &&
1007 cat <<-EOT >expected &&
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 &&
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 &&
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 &&
1075 cat <<-EOT >expected &&
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 &&
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 &&
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 &&
1141 cat <<-EOT >expected &&
1142 0 0 0 0 :refs/remotes/origin/t/1 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
1147 1 0 0 0 ann5 t/5 t/3 t/1
1149 0 0 1 0 hd5 hd3 t/3 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 &&
1159 1 0 0 0 ann3 t/3 t/1
1161 1 0 0 0 ann5 t/5 t/3 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
1172 1 0 0 0 ann5 t/5 t/3 t/1
1174 0 0 1 0 hd5 hd3 t/3 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
1183 1 0 0 0 ann5 t/5 t/3 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 &&
1206 cat <<-EOT >expected &&
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 &&
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 &&
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 &&
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 &&
1257 cat <<-EOT >expected &&
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 &&
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 &&
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 &&
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 &&
1298 cat <<-EOT >expected &&
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 &&
1314 cat <<-EOT >expected &&
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 &&
1334 cat <<-EOT >expected &&
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 &&
1391 dotgr() { <graph tgrecurse_ -v hdfile=hdlist -v brfile=brlist -v withbr=1 \
1392 -v startb="$@"; } &&
1393 cat <<-EOT >expected &&
1397 dotgr "t/A" -v inclbr="t/A" >actual &&
1398 test_cmp actual expected &&
1399 cat <<-EOT >expected &&
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 &&
1423 dotgr "t/A" -v inclbr="t/1" >actual &&
1424 test_cmp actual expected &&
1425 cat <<-EOT >expected &&
1431 dotgr "t/A" -v preord=1 -v inclbr="t/1" >actual &&
1432 test_cmp actual expected &&
1433 cat <<-EOT >expected &&
1439 dotgr "t/A" -v inclbr="t/1" -v filter=2 >actual &&
1440 test_cmp actual expected &&
1441 cat <<-EOT >expected &&
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 &&
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 &&
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 &&
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 &&
1529 dotgr() { <graph tgrecurse_ -v hdfile=hdlist -v brfile=brlist -v withbr=1 \
1530 -v startb="$@"; } &&
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 &&
1564 dotgr "t/A" -v exclbr="t/4 t/2" >actual &&
1565 test_cmp actual expected &&
1566 cat <<-EOT >expected &&
1571 dotgr "t/A" -v preord=1 -v exclbr="t/4 t/2" >actual &&
1572 test_cmp actual expected &&
1573 cat <<-EOT >expected &&
1578 dotgr "t/A" -v exclbr="t/4 t/2" -v filter=2 >actual &&
1579 test_cmp actual expected &&
1580 cat <<-EOT >expected &&
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 &&
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 &&
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 &&
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 &&
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 &&
1679 dotgr() { <graph tgrecurse_ -v hdfile=hdlist -v brfile=brlist -v withbr=1 \
1680 -v startb="$@"; } &&
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 &&
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 &&
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 &&
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 &&
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