svg.t 786 B

12345678910111213141516171819202122232425262728293031323334353637
  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. use IO::Scalar;
  12. {
  13. my $print = Slic3r::Test::init_print('20mm_cube');
  14. eval {
  15. my $fh = IO::Scalar->new(\my $gcode);
  16. $print->print->export_svg(output_fh => $fh, quiet => 1);
  17. $fh->close;
  18. };
  19. die $@ if $@;
  20. ok !$@, 'successful SVG export';
  21. }
  22. {
  23. my $print = Slic3r::Test::init_print('two_hollow_squares');
  24. eval {
  25. my $fh = IO::Scalar->new(\my $gcode);
  26. $print->print->export_svg(output_fh => $fh, quiet => 1);
  27. $fh->close;
  28. };
  29. die $@ if $@;
  30. ok !$@, 'successful SVG export of object with two islands';
  31. }
  32. __END__