Ported config load / stored to C++, thanks @alexrj

Implemented import of config values from the G-code.
This commit is contained in:
bubnikv 2017-06-14 17:51:14 +02:00
parent c61e098066
commit 93dce7a2d3
7 changed files with 192 additions and 35 deletions

View file

@ -4,7 +4,7 @@ use strict;
use warnings;
use Slic3r::XS;
use Test::More tests => 146;
use Test::More tests => 147;
foreach my $config (Slic3r::Config->new, Slic3r::Config::Static::new_FullPrintConfig) {
$config->set('layer_height', 0.3);
@ -241,4 +241,13 @@ foreach my $config (Slic3r::Config->new, Slic3r::Config::Static::new_FullPrintCo
is_deeply $config->get('retract_layer_change'), [0,0], 'retract_layer_change is disabled with spiral_vase';
}
{
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__