4 # datamash distinguishes empty and missing fields, so a manual
5 # implementation is needed
7 if($2 == "" || $1 == "") {
8 print "empty field encountered on line" " " NR >"/dev/stderr"
21 if (( cnt
!= exp
)); then
22 echo >&2 "$cnt fields encountered, expected $exp"
25 echo >&2 "$cnt fields"
29 # check consistent output
30 aur depends git aurutils
2>/dev
/null | check_pairs
31 aur depends
--all git aurutils
2>/dev
/null | check_pairs
32 aur depends
--table git aurutils
2>/dev
/null | check_table
33 aur depends
--table -r git aurutils
2>/dev
/null | check_table
35 # git is non-AUR dependency specified on command-line
36 cnt
=$
(aur depends
--json git aurutils | jq length
)
39 # single AUR dependency from command-line
40 cnt
=$
(aur depends
--json aurutils | jq length
)
43 # git is included as non-AUR dependency for aurutils
44 cnt
=$
(aur depends
--json --all git aurutils | jq length
)
47 # list all direct dependencies
48 cnt
=$
(aur depends
--json --all aurutils | jq length
)