aboutsummaryrefslogtreecommitdiffstats
path: root/tests/macros.sh
blob: 519e7b441d88eb88249636c43157aaadc531fb2b (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
27
28
#!/bin/sh

# $Id$

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 %_localstatedir /var/lib
mcheck %_bindir /usr/bin
mcheck %_sbindir /usr/sbin
mcheck %_prefix /usr

exit $err