#!/bin/sh

export COMPILER_ROOT=../../..

. $COMPILER_ROOT/scripts/test-utils.sh

fpp_filenames=$COMPILER_ROOT/bin/fpp-filenames

run_test()
{
  args=$1
  infile=$2
  if test -n "$3"
  then
    outfile=$3
  else
    outfile=$infile
  fi
  $fpp_filenames $args $infile.fpp 2>&1 | remove_path_prefix > $outfile.out.txt
  diff -u $outfile.ref.txt $outfile.out.txt > $outfile.diff.txt 2>&1
}

include()
{
  run_test "" include
}

ok()
{
  run_test "" ok
}

tests="
include
ok
"

run_suite $tests
