File: test1.sh

package info (click to toggle)
python-rarfile 2.6-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 340 kB
  • ctags: 306
  • sloc: python: 1,764; makefile: 156; sh: 36
file content (32 lines) | stat: -rwxr-xr-x 686 bytes parent folder | download
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
29
30
31
32
#! /bin/sh

PYTHONPATH=..:$PYTHONPATH
export PYTHONPATH

JAVA_OPTIONS="-Dpython.path=`pwd`/.."
export JAVA_OPTIONS

plist="python2.4 python2.5 python2.6 python2.7 python3.1 python3.2 python3.3 pypy jython jython2.7"

rm -f test.diffs

for py in $plist; do
  if which $py > /dev/null; then
    for f in files/*.rar; do
      printf "%s -> %-30s .. " $py $f
      $py ../dumprar.py -t -t -v -ppassword $f > $f.$py
      if diff -uw $f.exp $f.$py > /dev/null; then
        echo "ok"
      else
        echo "FAIL"
        echo "#### $py ####" >> test.diffs
        diff -uw $f.exp $f.$py >> test.diffs
      fi
    done
    echo ""
  else
    echo $py not available
    echo ""
  fi
done