# LVB (c) Copyright 2003-2006 by Daniel Barker.
# Permission is granted to copy and use this program provided that no fee is
# charged for it and provided that this copyright notice is not removed.

# Check a matrix with less than the mininum number of bases causes a
# fatal error, but not an assertion failure.

# run LVB
$lvb = $ENV{LVB_EXECUTABLE};
$output = `"$lvb" <./std.in`;
$status = $?;

# check output
if ($status == 0)
{
    if (($output =~ /\n0\s+2\n/)
	and ($output =~ / equally parsimonious trees of length 2 written to file \'outtree\'\n/))
    {
	print "test passed\n";
    }
    else
    {
	print "test failed\n";
    }
}
else
{
    print "test failed\n";
}

unlink "outtree";
