#!/usr/bin/env sh

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

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

  # Check that -canon agrees with ptransform on multivariate output.
  $testhelper ptransform $test.multi $test.multi -canon
  if [ $? != 0 ]; then exit 1; fi

  # Check that -canon agrees with ptransform on univariate output.
  $testhelper ptransform $test.uni $test.uni -canon
  if [ $? != 0 ]; then exit 1; fi
fi

$testhelper hilbert $test.*test $test.multi $* -univariate off -canon -algorithm deform -oformat m2
if [ $? != 0 ]; then exit 1; fi

$testhelper hilbert $test.*test $test.uni $* -univariate -algorithm deform -canon -oformat m2
if [ $? != 0 ]; then exit 1; fi
