2014-05-26 09:13:53 +00:00
|
|
|
use Test::More tests => 2;
|
2013-06-07 10:00:03 +00:00
|
|
|
use strict;
|
|
|
|
use warnings;
|
|
|
|
|
|
|
|
BEGIN {
|
|
|
|
use FindBin;
|
|
|
|
use lib "$FindBin::Bin/../lib";
|
2017-08-18 07:58:50 +00:00
|
|
|
use local::lib "$FindBin::Bin/../local-lib";
|
2013-06-07 10:00:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
use Slic3r;
|
|
|
|
use Slic3r::Test;
|
2018-03-16 11:07:54 +00:00
|
|
|
use IO::Scalar;
|
2013-06-07 10:00:03 +00:00
|
|
|
|
|
|
|
{
|
|
|
|
my $print = Slic3r::Test::init_print('20mm_cube');
|
|
|
|
eval {
|
|
|
|
my $fh = IO::Scalar->new(\my $gcode);
|
2014-05-09 12:24:35 +00:00
|
|
|
$print->print->export_svg(output_fh => $fh, quiet => 1);
|
2013-06-07 10:00:03 +00:00
|
|
|
$fh->close;
|
|
|
|
};
|
2014-05-26 09:13:53 +00:00
|
|
|
die $@ if $@;
|
2013-06-07 10:00:03 +00:00
|
|
|
ok !$@, 'successful SVG export';
|
|
|
|
}
|
|
|
|
|
2014-05-26 09:13:53 +00:00
|
|
|
{
|
|
|
|
my $print = Slic3r::Test::init_print('two_hollow_squares');
|
|
|
|
eval {
|
|
|
|
my $fh = IO::Scalar->new(\my $gcode);
|
|
|
|
$print->print->export_svg(output_fh => $fh, quiet => 1);
|
|
|
|
$fh->close;
|
|
|
|
};
|
|
|
|
die $@ if $@;
|
|
|
|
ok !$@, 'successful SVG export of object with two islands';
|
|
|
|
}
|
|
|
|
|
2013-06-07 10:00:03 +00:00
|
|
|
__END__
|