svg.t 770 B

123456789101112131415161718192021222324252627282930313233343536
  1. use Test::More tests => 2;
  2. use strict;
  3. use warnings;
  4. BEGIN {
  5. use FindBin;
  6. use lib "$FindBin::Bin/../lib";
  7. use local::lib "$FindBin::Bin/../local-lib";
  8. }
  9. use Slic3r;
  10. use Slic3r::Test;
  11. {
  12. my $print = Slic3r::Test::init_print('20mm_cube');
  13. eval {
  14. my $fh = IO::Scalar->new(\my $gcode);
  15. $print->print->export_svg(output_fh => $fh, quiet => 1);
  16. $fh->close;
  17. };
  18. die $@ if $@;
  19. ok !$@, 'successful SVG export';
  20. }
  21. {
  22. my $print = Slic3r::Test::init_print('two_hollow_squares');
  23. eval {
  24. my $fh = IO::Scalar->new(\my $gcode);
  25. $print->print->export_svg(output_fh => $fh, quiet => 1);
  26. $fh->close;
  27. };
  28. die $@ if $@;
  29. ok !$@, 'successful SVG export of object with two islands';
  30. }
  31. __END__