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

# $Id: macros.sh 242828 2008-06-02 12:41:00Z pixel $

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