tg.sh: handle help -h
[topgit/pro.git] / t / t1370-awk-topgit_deps.sh
blob233c9869a569eb5c24403a5bbf17d03f3cc2de5f
1 #!/bin/sh
3 test_description='topgit_deps.awk functionality'
5 . ./test-lib.sh
7 ap="$(tg --awk-path)" && test -n "$ap" && test -d "$ap" || die
8 aptd="$ap/topgit_deps"
9 test -f "$aptd" && test -r "$aptd" && test -x "$aptd" || die
11 # Final output of topgit_deps_prepare looks like:
13 # 5e6bd1db23329803939ffa1e1f9052e678ea4a06 t/sample
15 # That output then gets piped through this:
17 # git cat-file --batch='%(objecttype) %(objectsize) %(rest)' | tr '\0' '\27'
19 # and fed to the topgit_deps script. awk is not guaranteed to handle the
20 # NUL character so by running through tr (which is POSIXly supposed to) if
21 # some unfortunate blob is involved this topgit_deps script still has a
22 # chance of doing something correct with the result
24 # note that despite the format provided, "missing" will always be the second
25 # field output for missing objects
27 test_plan 40
29 v_blobify() { eval "$1="'"$(git hash-object -t blob -w --stdin)"'; }
30 v_blobify mtblob </dev/null || die
31 noeol="$(printf '%s' "noeol" | git hash-object -t blob -w --stdin)" || die
32 v_blobify mtline <<-EOT || die
34 EOT
35 v_blobify looper <<-EOT || die
36 looper
37 EOT
38 v_blobify deps <<-EOT || die
39 dep1
40 dep2
41 EOT
42 v_blobify alts <<-EOT || die
43 alt1
44 alt2
45 EOT
46 v_blobify dupe2 <<-EOT || die
47 dupe
48 dupe
49 EOT
50 v_blobify dupe3 <<-EOT || die
51 dupe
52 dupe
53 dupe
54 EOT
55 v_blobify dupe32 <<-EOT || die
56 dupe
57 two
58 dupe
59 two
60 dupe
61 EOT
62 v_blobify looperduper <<-EOT || die
63 looper
64 dupe
65 two
66 dupe
67 two
68 dupe
69 looper
70 EOT
71 v_blobify tens <<-EOT || die
72 one
73 two
74 two
75 three
76 three
77 four
78 five
79 five
80 six
81 seven
82 seven
83 eight
84 nine
85 ten
86 EOT
88 doprep() {
89 git cat-file --batch='%(objecttype) %(objectsize) %(rest)' |
90 tr '\0' '\27'
92 dotgdeps() {
93 doprep |
94 awk -f "$aptd" "$@"
97 test_expect_success 'topgit_deps runs' '
98 # some stupid awks might not even compile it
99 awk -f "$aptd" </dev/null &&
100 # and make sure the helper works too
101 dotgdeps </dev/null
104 test_expect_success 'invalid anfile fails if read' '
105 rm -f no-such-file &&
106 test ! -e no-such-file &&
107 >expected &&
108 </dev/null dotgdeps -v anfile=no-such-file >actual &&
109 test_cmp actual expected &&
110 </dev/null dotgdeps -v withan=1 -v anfile=no-such-file >actual &&
111 test_cmp actual expected &&
112 echo "..." | test_must_fail dotgdeps -v anfile=no-such-file >actual &&
113 test_cmp actual expected &&
114 echo "..." | dotgdeps -v withan=1 -v anfile=no-such-file >actual &&
115 test_cmp actual expected &&
116 test ! -e no-such-file
119 test_expect_success 'invalid brfile fails if read' '
120 rm -f no-such-file &&
121 test ! -e no-such-file &&
122 >expected &&
123 </dev/null dotgdeps -v brfile=no-such-file >actual &&
124 test_cmp actual expected &&
125 </dev/null dotgdeps -v tgonly=1 -v brfile=no-such-file >actual &&
126 test_cmp actual expected &&
127 echo "..." |
128 test_must_fail dotgdeps -v tgonly=1 -v brfile=no-such-file >actual &&
129 test_cmp actual expected &&
130 echo "..." | dotgdeps -v brfile=no-such-file >actual &&
131 test_cmp actual expected &&
132 test ! -e no-such-file
135 test_expect_success 'anfile unperturbed without rman' '
136 echo "an file here" >anorig &&
137 cat anorig >anfile &&
138 >expected &&
139 </dev/null dotgdeps -v anfile=anfile >actual &&
140 test_cmp actual expected &&
141 test_cmp anfile anorig &&
142 </dev/null dotgdeps -v withan=1 -v anfile=anfile >actual &&
143 test_cmp actual expected &&
144 test_cmp anfile anorig &&
145 echo "..." | dotgdeps -v anfile=anfile >actual &&
146 test_cmp actual expected &&
147 test_cmp anfile anorig &&
148 echo "..." | dotgdeps -v withan=1 -v anfile=anfile >actual &&
149 test_cmp actual expected &&
150 test_cmp anfile anorig
153 test_expect_success 'brfile unperturbed without rmbr' '
154 echo "br file here" >brorig &&
155 cat brorig >brfile &&
156 >expected &&
157 </dev/null dotgdeps -v brfile=brfile >actual &&
158 test_cmp actual expected &&
159 test_cmp brfile brorig &&
160 </dev/null dotgdeps -v tgonly=1 -v brfile=brfile >actual &&
161 test_cmp actual expected &&
162 test_cmp brfile brorig &&
163 echo "..." | dotgdeps -v brfile=brfile >actual &&
164 test_cmp actual expected &&
165 test_cmp brfile brorig &&
166 echo "..." | dotgdeps -v tgonly=1 -v brfile=brfile >actual &&
167 test_cmp actual expected &&
168 test_cmp brfile brorig
171 test_expect_success 'anfile removed with rman' '
172 echo "an file here" >anorig &&
173 >expected &&
174 cat anorig >anfile &&
175 </dev/null dotgdeps -v anfile=anfile -v rman=1 >actual &&
176 test_cmp actual expected &&
177 test ! -e anfile &&
178 cat anorig >anfile &&
179 </dev/null dotgdeps -v withan=1 -v anfile=anfile -v rman=1 >actual &&
180 test_cmp actual expected &&
181 test ! -e anfile &&
182 cat anorig >anfile &&
183 echo "..." | dotgdeps -v anfile=anfile -v rman=1 >actual &&
184 test_cmp actual expected &&
185 test ! -e anfile &&
186 cat anorig >anfile &&
187 echo "..." | dotgdeps -v withan=1 -v anfile=anfile -v rman=1 >actual &&
188 test_cmp actual expected &&
189 test ! -e anfile
192 test_expect_success 'brfile removed with rmbr' '
193 echo "br file here" >brorig &&
194 >expected &&
195 cat brorig >brfile &&
196 </dev/null dotgdeps -v brfile=brfile -v rmbr=1 >actual &&
197 test_cmp actual expected &&
198 test ! -e brfile &&
199 cat brorig >brfile &&
200 </dev/null dotgdeps -v tgonly=1 -v brfile=brfile -v rmbr=1 >actual &&
201 test_cmp actual expected &&
202 test ! -e brfile &&
203 cat brorig >brfile &&
204 echo "..." | dotgdeps -v brfile=brfile -v rmbr=1 >actual &&
205 test_cmp actual expected &&
206 test ! -e brfile &&
207 cat brorig >brfile &&
208 echo "..." | dotgdeps -v tgonly=1 -v brfile=brfile -v rmbr=1 >actual &&
209 test_cmp actual expected &&
210 test ! -e brfile
213 test_expect_success 'basic functionality' '
214 echo "t/basic dep1" >expected &&
215 echo "t/basic dep2" >>expected &&
216 echo "$deps t/basic" | dotgdeps >actual &&
217 test_cmp actual expected
220 test_expect_success 'basic noeol functionality' '
221 echo "t/noeol1 noeol" >expected &&
222 echo "t/basic dep1" >>expected &&
223 echo "t/basic dep2" >>expected &&
224 echo "t/noeol2 noeol" >>expected &&
225 <<-EOT dotgdeps >actual &&
226 $noeol t/noeol1
227 $deps t/basic
228 $noeol t/noeol2
230 test_cmp actual expected
233 test_expect_success 'basic functionality rev' '
234 echo "dep2 t/basic" >expected &&
235 echo "dep1 t/basic" >>expected &&
236 echo "$deps t/basic" | dotgdeps -v rev=1 >actual &&
237 test_cmp actual expected
240 test_expect_success 'basic functionality withbr' '
241 echo "t/basic dep1" >expected &&
242 echo "t/basic dep2" >>expected &&
243 echo "t/basic t/basic" >>expected &&
244 echo "$deps t/basic" | dotgdeps -v withbr=1 >actual &&
245 test_cmp actual expected
248 test_expect_success 'basic functionality withbr rev' '
249 echo "t/basic t/basic" >expected &&
250 echo "dep2 t/basic" >>expected &&
251 echo "dep1 t/basic" >>expected &&
252 echo "$deps t/basic" | dotgdeps -v withbr=1 -v rev=1 >actual &&
253 test_cmp actual expected
256 test_expect_success 'multi functionality' '
257 echo "t/basic dep1" >expected &&
258 echo "t/basic dep2" >>expected &&
259 echo "t/multi alt1" >>expected &&
260 echo "t/multi alt2" >>expected &&
261 <<-EOT dotgdeps >actual &&
262 $deps t/basic
263 $alts t/multi
265 test_cmp actual expected
268 test_expect_success 'multi functionality rev' '
269 echo "dep2 t/basic" >expected &&
270 echo "dep1 t/basic" >>expected &&
271 echo "alt2 t/multi" >>expected &&
272 echo "alt1 t/multi" >>expected &&
273 <<-EOT dotgdeps -v rev=1 >actual &&
274 $deps t/basic
275 $alts t/multi
277 test_cmp actual expected
280 test_expect_success 'multi functionality withbr' '
281 echo "t/basic dep1" >expected &&
282 echo "t/basic dep2" >>expected &&
283 echo "t/basic t/basic" >>expected &&
284 echo "t/multi alt1" >>expected &&
285 echo "t/multi alt2" >>expected &&
286 echo "t/multi t/multi" >>expected &&
287 <<-EOT dotgdeps -v withbr=1 >actual &&
288 $deps t/basic
289 $alts t/multi
291 test_cmp actual expected
294 test_expect_success 'multi functionality rev withbr' '
295 echo "t/basic t/basic" >expected &&
296 echo "dep2 t/basic" >>expected &&
297 echo "dep1 t/basic" >>expected &&
298 echo "t/multi t/multi" >>expected &&
299 echo "alt2 t/multi" >>expected &&
300 echo "alt1 t/multi" >>expected &&
301 <<-EOT dotgdeps -v rev=1 -v withbr=1 >actual &&
302 $deps t/basic
303 $alts t/multi
305 test_cmp actual expected
308 test_expect_success 'self loop omitted' '
309 >expected &&
310 echo "$looper looper" | dotgdeps >actual &&
311 test_cmp actual expected
314 test_expect_success 'self loop omitted withbr' '
315 echo "looper looper" >expected &&
316 echo "$looper looper" | dotgdeps -v withbr=1 >actual &&
317 test_cmp actual expected
320 test_expect_success 'dupes omitted' '
321 echo "t/check dupe" >expected &&
322 echo "$dupe2 t/check" | dotgdeps >actual &&
323 test_cmp actual expected &&
324 echo "$dupe3 t/check" | dotgdeps >actual &&
325 test_cmp actual expected
328 test_expect_success 'dupes omitted withbr' '
329 echo "t/check dupe" >expected &&
330 echo "t/check t/check" >>expected &&
331 echo "$dupe2 t/check" | dotgdeps -v withbr=1 >actual &&
332 test_cmp actual expected &&
333 echo "$dupe3 t/check" | dotgdeps -v withbr=1 >actual &&
334 test_cmp actual expected
337 test_expect_success 'multi dupes omitted' '
338 echo "t/check dupe" >expected &&
339 echo "t/check dupe" >>expected &&
340 echo "t/check2 dupe" >>expected &&
341 echo "t/check2 dupe" >>expected &&
342 <<-EOT dotgdeps >actual &&
343 $dupe2 t/check
344 $dupe2 t/check
345 $dupe3 t/check2
346 $dupe3 t/check2
348 test_cmp actual expected
351 test_expect_success 'multi dupes omitted withbr' '
352 echo "t/check dupe" >expected &&
353 echo "t/check t/check" >>expected &&
354 echo "t/check dupe" >>expected &&
355 echo "t/check t/check" >>expected &&
356 echo "t/check2 dupe" >>expected &&
357 echo "t/check2 t/check2" >>expected &&
358 echo "t/check2 dupe" >>expected &&
359 echo "t/check2 t/check2" >>expected &&
360 <<-EOT dotgdeps -v withbr=1 >actual &&
361 $dupe2 t/check
362 $dupe2 t/check
363 $dupe3 t/check2
364 $dupe3 t/check2
366 test_cmp actual expected
369 test_expect_success 'super multi loop dupes omitted' '
370 echo "t/check dupe" >expected &&
371 echo "t/check two" >>expected &&
372 echo "looper dupe" >>expected &&
373 echo "looper two" >>expected &&
374 <<-EOT dotgdeps >actual &&
375 $dupe32 t/check
376 $looperduper looper
378 test_cmp actual expected
381 test_expect_success 'super multi loop dupes omitted rev' '
382 echo "two t/check" >expected &&
383 echo "dupe t/check" >>expected &&
384 echo "two looper" >>expected &&
385 echo "dupe looper" >>expected &&
386 <<-EOT dotgdeps -v rev=1 >actual &&
387 $dupe32 t/check
388 $looperduper looper
390 test_cmp actual expected
393 test_expect_success 'super multi loop dupes omitted withbr' '
394 echo "t/check dupe" >expected &&
395 echo "t/check two" >>expected &&
396 echo "t/check t/check" >>expected &&
397 echo "looper dupe" >>expected &&
398 echo "looper two" >>expected &&
399 echo "looper looper" >>expected &&
400 <<-EOT dotgdeps -v withbr=1 >actual &&
401 $dupe32 t/check
402 $looperduper looper
404 test_cmp actual expected
407 test_expect_success 'super multi loop dupes omitted rev withbr' '
408 echo "t/check t/check" >expected &&
409 echo "two t/check" >>expected &&
410 echo "dupe t/check" >>expected &&
411 echo "looper looper" >>expected &&
412 echo "two looper" >>expected &&
413 echo "dupe looper" >>expected &&
414 <<-EOT dotgdeps -v rev=1 -v withbr=1 >actual &&
415 $dupe32 t/check
416 $looperduper looper
418 test_cmp actual expected
421 test_expect_success 'exclbr other' '
422 for b in one two three four five six seven eight nine ten; do
423 echo "t/excl $b"
424 done >expected &&
425 echo "$tens t/excl" | dotgdeps -v exclbr="other" >actual &&
426 test_cmp actual expected
429 test_expect_success 'exclbr even' '
430 for b in one three five seven nine; do
431 echo "t/excl $b"
432 done >expected &&
433 echo "$tens t/excl" |
434 dotgdeps -v exclbr="two four six eight ten" >actual &&
435 test_cmp actual expected
438 test_expect_success 'exclbr odd' '
439 for b in two four six eight ten; do
440 echo "t/excl $b"
441 done >expected &&
442 echo "$tens t/excl" |
443 dotgdeps -v exclbr="one three five seven nine" >actual &&
444 test_cmp actual expected
447 test_expect_success 'exclbr primes' '
448 for b in one four six eight nine ten; do
449 echo "t/excl $b"
450 done >expected &&
451 echo "$tens t/excl" |
452 dotgdeps -v exclbr="two three five seven" >actual &&
453 test_cmp actual expected
456 test_expect_success 'inclbr other' '
457 >expected &&
458 echo "$tens t/excl" | dotgdeps -v inclbr="other" >actual &&
459 test_cmp actual expected
462 test_expect_success 'inclbr even' '
463 for b in two four six eight ten; do
464 echo "t/excl $b"
465 done >expected &&
466 echo "$tens t/excl" |
467 dotgdeps -v inclbr="two four six eight ten" >actual &&
468 test_cmp actual expected
471 test_expect_success 'inclbr odd' '
472 for b in one three five seven nine; do
473 echo "t/excl $b"
474 done >expected &&
475 echo "$tens t/excl" |
476 dotgdeps -v inclbr="one three five seven nine" >actual &&
477 test_cmp actual expected
480 test_expect_success 'inclbr primes' '
481 for b in two three five seven; do
482 echo "t/excl $b"
483 done >expected &&
484 echo "$tens t/excl" |
485 dotgdeps -v inclbr="two three five seven" >actual &&
486 test_cmp actual expected
489 test_expect_success 'inclbr odd exclbr primes' '
490 echo "t/incexc one" >expected &&
491 echo "t/incexc nine" >>expected &&
492 echo "t/excinc one" >>expected &&
493 echo "t/excinc nine" >>expected &&
494 <<-EOT dotgdeps -v inclbr="one three five seven nine" \
495 -v exclbr="two three five seven" >actual &&
496 $tens t/incexc
497 $tens t/excinc
499 test_cmp actual expected
502 test_expect_success 'exclbr even inclbr primes rev withbr' '
503 echo "seven t/excinc" >expected &&
504 echo "five t/excinc" >>expected &&
505 echo "three t/excinc" >>expected &&
506 echo "t/incexc t/incexc" >>expected &&
507 echo "nine t/incexc" >>expected &&
508 echo "seven t/incexc" >>expected &&
509 echo "five t/incexc" >>expected &&
510 echo "three t/incexc" >>expected &&
511 echo "one t/incexc" >>expected &&
512 <<-EOT dotgdeps -v rev=1 -v withbr=1 \
513 -v exclbr="two four six eight ten" \
514 -v inclbr="two three t/incexc five seven" >actual &&
515 $tens t/excinc
516 $tens t/incexc
518 test_cmp actual expected
521 test_expect_success 'exclbr branch deps inclbr rev' '
522 echo "seven t/second" >expected &&
523 <<-EOT dotgdeps -v rev=1 -v exclbr=t/first -v inclbr=seven >actual &&
524 $tens t/first
525 $tens t/second
527 test_cmp actual expected
530 test_expect_success 'anfile works' '
531 echo "t/top dep1" >expected &&
532 echo "t/top dep2" >>expected &&
533 echo "t/top t/top" >>expected &&
534 echo "dep1 dep1" >>expected &&
535 echo "dep2 dep2" >>expected &&
536 echo "dep1" >anfile &&
537 <<-EOT dotgdeps -v withbr=1 >actual &&
538 $deps t/top
539 $mtblob dep1
540 $mtblob dep2
542 test_cmp actual expected &&
543 <<-EOT dotgdeps -v withbr=1 -v withan=1 -v anfile=anfile >actual &&
544 $deps t/top
545 $mtblob dep1
546 $mtblob dep2
548 test_cmp actual expected &&
549 echo "t/top dep2" >expected &&
550 echo "t/top t/top" >>expected &&
551 echo "dep2 dep2" >>expected &&
552 <<-EOT dotgdeps -v withbr=1 -v anfile=anfile >actual &&
553 $deps t/top
554 $mtblob dep1
555 $mtblob dep2
557 test_cmp actual expected &&
558 echo "t/top dep1" >expected &&
559 echo "t/top dep2" >>expected &&
560 <<-EOT dotgdeps >actual &&
561 $deps t/top
562 $mtblob dep1
563 $mtblob dep2
565 test_cmp actual expected &&
566 <<-EOT dotgdeps -v withan=1 -v anfile=anfile >actual &&
567 $deps t/top
568 $mtblob dep1
569 $mtblob dep2
571 test_cmp actual expected &&
572 echo "t/top dep2" >expected &&
573 <<-EOT dotgdeps -v anfile=anfile >actual &&
574 $deps t/top
575 $mtblob dep1
576 $mtblob dep2
578 test_cmp actual expected
581 test_expect_success 'brfile works' '
582 echo "t/top dep1" >expected &&
583 echo "t/top dep2" >>expected &&
584 echo "t/top t/top" >>expected &&
585 echo "dep1 dep1" >>expected &&
586 echo "dep2 dep2" >>expected &&
587 echo "t/top" >brfile &&
588 <<-EOT dotgdeps -v withbr=1 >actual &&
589 $deps t/top
590 $mtblob dep1
591 $mtblob dep2
593 test_cmp actual expected &&
594 <<-EOT dotgdeps -v withbr=1 -v brfile=brfile >actual &&
595 $deps t/top
596 $mtblob dep1
597 $mtblob dep2
599 test_cmp actual expected &&
600 echo "t/top t/top" >expected &&
601 <<-EOT dotgdeps -v withbr=1 -v brfile=brfile -v tgonly=1 >actual &&
602 $deps t/top
603 $mtblob dep1
604 $mtblob dep2
606 test_cmp actual expected &&
607 echo "t/top dep1" >expected &&
608 echo "t/top dep2" >>expected &&
609 <<-EOT dotgdeps >actual &&
610 $deps t/top
611 $mtblob dep1
612 $mtblob dep2
614 test_cmp actual expected &&
615 <<-EOT dotgdeps -v brfile=brfile >actual &&
616 $deps t/top
617 $mtblob dep1
618 $mtblob dep2
620 test_cmp actual expected &&
621 >expected &&
622 <<-EOT dotgdeps -v brfile=brfile -v tgonly=1 >actual &&
623 $deps t/top
624 $mtblob dep1
625 $mtblob dep2
627 test_cmp actual expected
630 test_expect_success 'anfile + brfile works' '
631 <<-EOT cat >input &&
632 $dupe32 t/top
633 $deps dupe
634 $alts two
635 $mtblob dep1
636 $mtblob dep2
637 $mtblob alt1
638 $mtblob alt2
640 echo "dep1" >anfl &&
641 echo "alt2" >>anfl &&
642 echo "t/top" >brfl &&
643 echo "dupe" >>brfl &&
644 echo "two" >>brfl &&
645 echo "alt2" >>brfl &&
646 <<-EOT cat >expected &&
647 t/top dupe
648 t/top two
649 t/top t/top
650 dupe dep1
651 dupe dep2
652 dupe dupe
653 two alt1
654 two alt2
655 two two
656 dep1 dep1
657 dep2 dep2
658 alt1 alt1
659 alt2 alt2
661 <input dotgdeps -v withbr=1 >actual &&
662 test_cmp actual expected &&
663 <input dotgdeps -v withbr=1 -v brfile=brfl >actual &&
664 test_cmp actual expected &&
665 <input dotgdeps -v withbr=1 -v anfile=anfl -v withan=1 >actual &&
666 test_cmp actual expected &&
667 <input dotgdeps -v withbr=1 -v brfile=brfl -v anfile=anfl -v withan=1 >actual &&
668 test_cmp actual expected &&
669 <<-EOT cat >expected &&
670 t/top dupe
671 t/top two
672 t/top t/top
673 dupe dupe
674 two alt2
675 two two
676 alt2 alt2
678 <input dotgdeps -v withbr=1 -v brfile=brfl -v tgonly=1 >actual &&
679 test_cmp actual expected &&
680 <input dotgdeps -v withbr=1 -v brfile=brfl -v anfile=anfl -v withan=1 -v tgonly=1 >actual &&
681 test_cmp actual expected &&
682 <<-EOT cat >expected &&
683 t/top dupe
684 t/top two
685 t/top t/top
686 dupe dep2
687 dupe dupe
688 two alt1
689 two two
690 dep2 dep2
691 alt1 alt1
693 <input dotgdeps -v withbr=1 -v anfile=anfl >actual &&
694 test_cmp actual expected &&
695 <input dotgdeps -v withbr=1 -v brfile=brfl -v anfile=anfl >actual &&
696 test_cmp actual expected &&
697 <<-EOT cat >expected &&
698 t/top dupe
699 t/top two
700 t/top t/top
701 dupe dupe
702 two two
704 <input dotgdeps -v withbr=1 -v brfile=brfl -v anfile=anfl -v tgonly=1 >actual &&
705 test_cmp actual expected &&
707 # again but now without withbr=1
709 <<-EOT cat >expected &&
710 t/top dupe
711 t/top two
712 dupe dep1
713 dupe dep2
714 two alt1
715 two alt2
717 <input dotgdeps >actual &&
718 test_cmp actual expected &&
719 <input dotgdeps -v brfile=brfl >actual &&
720 test_cmp actual expected &&
721 <input dotgdeps -v anfile=anfl -v withan=1 >actual &&
722 test_cmp actual expected &&
723 <input dotgdeps -v brfile=brfl -v anfile=anfl -v withan=1 >actual &&
724 test_cmp actual expected &&
725 <<-EOT cat >expected &&
726 t/top dupe
727 t/top two
728 two alt2
730 <input dotgdeps -v brfile=brfl -v tgonly=1 >actual &&
731 test_cmp actual expected &&
732 <input dotgdeps -v brfile=brfl -v anfile=anfl -v withan=1 -v tgonly=1 >actual &&
733 test_cmp actual expected &&
734 <<-EOT cat >expected &&
735 t/top dupe
736 t/top two
737 dupe dep2
738 two alt1
740 <input dotgdeps -v anfile=anfl >actual &&
741 test_cmp actual expected &&
742 <input dotgdeps -v brfile=brfl -v anfile=anfl >actual &&
743 test_cmp actual expected &&
744 <<-EOT cat >expected &&
745 t/top dupe
746 t/top two
748 <input dotgdeps -v brfile=brfl -v anfile=anfl -v tgonly=1 >actual &&
749 test_cmp actual expected
752 test_done