#!/bin/sh

TEST="that directory inclusion works with files"

testdir=`dirname $0`
. $testdir/testlib

mkdir $work/include.d
if test $? -ne 0 ; then no_result; fi

cat > $work/include.d/foo <<EOF
dport pants
EOF

cat >$work/in <<EOF
include $work/include.d
EOF
if test $? -ne 0 ; then no_result; fi

$here/scan < $work/in > $work/out 2>&1
if test $? -ne 0 ; then fail ; fi

cat >$work/good <<EOF
kind = dport, spelling = "dport", file = "$work/include.d/foo", line = 1
kind = identifier, spelling = "pants", file = "$work/include.d/foo", line = 1
EOF

compare $work/good $work/out

# got this far?
pass
