aboutsummaryrefslogtreecommitdiffstats
path: root/tests/macros.sh
blob: 44f0df97eda8b87c05c94cf695e673104f402828 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/usr/bin/sh


RPMEVAL=./rpmeval

err=0

mcheck() {
    macro=$1
    is=$2
    echo -n "${macro}... "
    res=`$RPMEVAL macros ${macro}`
    if [ "X${res}" != "X${is}" ]; then
        echo "give ${res} not ${is}"
        err=$[ $err + 1]
    else
        echo "OK"
    fi
}

mcheck %_var /var
mcheck %_bindir /usr/bin
mcheck %_sbindir /usr/sbin
mcheck %_prefix /usr

exit $err