Slic3r/xs/t/22_config.t
Joseph Lenox 6736ff5fa6 Catch exception thrown when loading config files.
Thrown exception has been changed to be std::runtime_error, includes regression test (program does not crash when loading unknown keys).
Sends error/diagnostic message to std::cerr.

Addresses #3430
2016-07-19 00:31:10 -05:00

18 lines
378 B
Perl

#!/usr/bin/perl
use strict;
use warnings;
use Slic3r::XS;
use Test::More tests => 1;
{
use Cwd qw(abs_path);
use File::Basename qw(dirname);
my $class = Slic3r::Config->new;
my $path = abs_path($0);
my $config = $class->_load(dirname($path)."/inc/22_config_bad_config_options.ini");
ok 1, 'did not crash on reading invalid items in config';
}
__END__