# $Id: check_vcddump_fn,v 1.3 2003/02/09 13:25:08 rocky Exp $
# Pssst.... This file is intended to be sourced...

test_vcddump() {
  if [ ! -x "../frontends/cli/vcddump" ]; then
    echo "$0: No vcddump test skipped"
    return 77
  fi

  if have_cmp; then
      :
  else
    echo "$0: No cmp(1) found - cannot test vcddump"
    return 77
  fi

  VCDDUMP="../frontends/cli/vcddump"
  opts="$1"
  outfile="$2"
  rightfile="$3"

  if ${VCDDUMP} ${opts} >${outfile} 2>&1 ; then 
    :
  else
    echo "$0: ${VCDDUMP} ${opts} failed"
    return 2
  fi

  if cmp ${outfile} ${rightfile} ; then
      :
  else
    return 3
  fi

  rm ${outfile}
  return 0
}

#;;; Local Variables: ***
#;;; mode:shell-script ***
#;;; eval: (sh-set-shell "bash") ***
#;;; End: ***
