File: run_irrdecom_test

package info (click to toggle)
frobby 0.9.6-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 11,616 kB
  • sloc: cpp: 30,134; sh: 1,184; makefile: 306; ansic: 102; lisp: 10
file content (37 lines) | stat: -rwxr-xr-x 1,095 bytes parent folder | download | duplicates (6)
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
33
34
35
36
37
#!/usr/bin/env sh

frobby=../../bin/frobby
testhelper=../testScripts/testhelper
test="$1"
shift

if [ "$1" = "_full" ];
then
  shift;

  # Check -canon agrees with transform on ideal list
  $testhelper transform $test.irrdecom $test.irrdecom -canon
  if [ $? != 0 ]; then exit 1; fi

  # Check -canon agrees with transform on ideal
  $testhelper transform $test.irrdecom_ideal $test.irrdecom_ideal -canon
  if [ $? != 0 ]; then exit 1; fi

  # Check that taking products relate the two representations.
  $testhelper transform $test.irrdecom $test.irrdecom_ideal \
    -product -canon
  if [ $? != 0 ]; then exit 1; fi

  # Check that intersection is inverse of irrdecom.
  $frobby transform < `ls $test.*test` > /tmp/$test.test \
    -canon -minimize 2>/dev/null
  $testhelper intersect $test.irrdecom /tmp/$test.test -canon
  if [ $? != 0 ]; then exit 1; fi
  rm /tmp/$test.test
fi

$testhelper irrdecom $test.*test $test.irrdecom $* -encode off -canon
if [ $? != 0 ]; then exit 1; fi

$testhelper irrdecom $test.*test $test.irrdecom_ideal $* -encode on -canon
if [ $? != 0 ]; then exit 1; fi