aboutsummaryrefslogtreecommitdiffstats
path: root/tests/macros.sh
blob: 972ceca36d4aa3ff35e75d3f164ccd12988cdec2 (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
#!/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