diff options
author | Olivier Thauvin <nanardon@mandriva.org> | 2007-02-22 13:01:24 +0000 |
---|---|---|
committer | Olivier Thauvin <nanardon@mandriva.org> | 2007-02-22 13:01:24 +0000 |
commit | 87f50a0d0933b3a61e5f48b7683f92cb4478dfd2 (patch) | |
tree | f0b06fdaf572f232edb7071a49f24d9abebb3a56 /tests | |
parent | f3234ef5dcce7d8998bbc77e3ac9f7f87ef0e952 (diff) | |
download | rpm-setup-87f50a0d0933b3a61e5f48b7683f92cb4478dfd2.tar rpm-setup-87f50a0d0933b3a61e5f48b7683f92cb4478dfd2.tar.gz rpm-setup-87f50a0d0933b3a61e5f48b7683f92cb4478dfd2.tar.bz2 rpm-setup-87f50a0d0933b3a61e5f48b7683f92cb4478dfd2.tar.xz rpm-setup-87f50a0d0933b3a61e5f48b7683f92cb4478dfd2.zip |
- add regression tests
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/macros.sh | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/macros.sh b/tests/macros.sh new file mode 100755 index 0000000..519e7b4 --- /dev/null +++ b/tests/macros.sh @@ -0,0 +1,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 |