# 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 in a file named 'data' (the LVB 1.0 matrix file name)
# cannot be read by LVB.

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

# check output
if ($output =~ /assertion/i)
{
    print "test failed: assertion failure\n";
}
elsif (($output =~ /FATAL ERROR.*cannot open/) && ($status != 0))
{
    print "test passed\n";
}
else
{
    print "test failed\n";
}
