Use spdx identifier for licenses
[opensuse:spec-cleaner.git] / tests / _run
1 #!/bin/sh
2
3 pass=0
4 fail=0
5
6 echo "Running tests:"
7 echo
8
9 for i in \
10   dos2unix \
11   make-params \
12   patches \
13   pkgconfig \
14   requires \
15   ; do
16
17   echo -n "$i ... "
18
19   if ../spec-cleaner "$i-in.spec" | diff -u --label="$i-out.spec" -- - "$i-out.spec" > fail-$i.diff ; then
20     rm -f fail-$i.diff
21     echo "passed"
22     pass=`expr $pass + 1`
23   else
24     if [ "$1" != "-k" ]; then
25       rm -f fail-$i.diff
26     fi
27     echo "FAILED!"
28     fail=`expr $fail + 1`
29   fi
30
31 done
32
33 echo
34 echo "TOTAL:  `expr $pass + $fail`"
35 echo "Passed: $pass"
36 echo "Failed: $fail"