File: svg.t

package info (click to toggle)
slic3r 1.3.0%2Bdfsg1-6
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 8,572 kB
  • sloc: cpp: 63,126; perl: 21,512; ansic: 6,312; sh: 591; xml: 201; makefile: 37; python: 11
file content (36 lines) | stat: -rw-r--r-- 770 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
use Test::More tests => 2;
use strict;
use warnings;

BEGIN {
    use FindBin;
    use lib "$FindBin::Bin/../lib";
    use local::lib "$FindBin::Bin/../local-lib";
}

use Slic3r;
use Slic3r::Test;

{
    my $print = Slic3r::Test::init_print('20mm_cube');
    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';
}

{
    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';
}

__END__