Use eval to fix fail XFAIL perl test and catch fatal errors.
* t/pm: No more XFAIL perl tests
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <https://www.gnu.org/licenses/>.
-# FIXME: this "expected failures" are in truth an hack used to
-# FIXME: to verify that some incorrect usages of our perl libraries
-# FIXME: raise an error. We should find a cleaner way to check that.
-perl_fake_XFAIL_TESTS = \
-t/pm/Channels.pl \
-t/pm/Cond2.pl \
-t/pm/Cond3.pl \
-t/pm/DisjCon2.pl \
-t/pm/DisjCon3.pl \
-t/pm/Version2.pl \
-t/pm/Version3.pl
-
XFAIL_TESTS = \
t/all.sh \
t/auxdir-pr19311.sh \
use Automake::Channels;
use Automake::Location;
-msg ('test-fatal', new Automake::Location ('.'), "Test Message");
+eval { msg ('test-fatal', new Automake::Location ('.'), "Test Message") };
+
+warn $@ if $@;
+
+exit 0 if $@;
+exit 1;
use Automake::Condition;
my $cond = new Automake::Condition ('TRUE');
-new Automake::Condition ($cond);
+eval { new Automake::Condition ($cond) };
+
+warn $@ if $@;
+
+exit 0 if $@;
+exit 1;
use Automake::Condition;
my $cond = new Automake::Condition ("COND1_TRUE");
-new Automake::Condition ("$cond");
+eval { new Automake::Condition ("$cond") };
+
+warn $@ if $@;
+
+exit 0 if $@;
+exit 1;
my $cond = new Automake::Condition ('TRUE');
my $cond2 = new Automake::DisjConditions ($cond);
-new Automake::DisjConditions ($cond2);
+
+eval { new Automake::DisjConditions ($cond2) };
+
+warn $@ if $@;
+
+exit 0 if $@;
+exit 1;
use Automake::DisjConditions;
my $cond = new Automake::Condition ("COND1_TRUE");
-new Automake::DisjConditions ("$cond");
+
+eval { new Automake::DisjConditions ("$cond") };
+
+warn $@ if $@;
+
+exit 0 if $@;
+exit 1;
use Automake::Version;
-Automake::Version::check ('', '1.2.3');
+eval { Automake::Version::check ('', '1.2.3') };
+
+warn $@ if $@;
+
+exit 0 if $@;
+exit 1;
use Automake::Version;
-Automake::Version::check ('1.2.3', '');
+eval { Automake::Version::check ('1.2.3', '') };
+
+warn $@ if $@;
+
+exit 0 if $@;
+exit 1;