#!/bin/sh
if [ $# -lt 2 ] ; then
  echo "usage: view-test [pass|fail] testnum"
  echo
  exit
fi

if [ ! -e "./$1/$2" ] ; then
  echo "Invalid test number."
  echo
  exit
fi

if [ $1 = "pass" ] ; then
  cat "./$1/$2/in"
else if [ $1 = "fail" ] ; then
    cat "./$1/$2"
  else
    echo "Invalid test type."
    echo
    exit
  fi
fi
