@@ -19,16 +19,6 @@ sub ask_yn {
19
19
unlike($a , qr / n/ i , $label );
20
20
}
21
21
22
- # first so no "bad plan" if skip_all
23
- {
24
- my @new = eval {PDL::Graphics::Simple::_translate_new()};
25
- diag(join ' ' ,explain $PDL::Graphics::Simple::mods ), plan skip_all => ' No plotting engines installed' if $@ =~ / Sorry, all known/ ;
26
- # ignore $engine
27
- is_deeply $new [1], {
28
- ' multi' => undef , ' output' => ' ' , ' size' => [ 8, 6, ' in' ], ' type' => ' i'
29
- } or diag explain \@new ;
30
- }
31
-
32
22
# error handling
33
23
eval {
34
24
PDL::Graphics::Simple::_translate_plot(undef , undef , with => ' line' , undef );
@@ -66,6 +56,20 @@ like $@, qr/Single-arg/;
66
56
is " @w " , " " , " no warnings" ;
67
57
}
68
58
59
+ {
60
+ my @new = eval {PDL::Graphics::Simple::_translate_new()};
61
+ if ($@ =~ / Sorry, all known/ ) {
62
+ diag(join ' ' ,explain $PDL::Graphics::Simple::mods );
63
+ ok 1, ' No plotting engines installed, stopping' ;
64
+ done_testing;
65
+ exit 0;
66
+ }
67
+ # ignore $engine
68
+ is_deeply $new [1], {
69
+ ' multi' => undef , ' output' => ' ' , ' size' => [ 8, 6, ' in' ], ' type' => ' i'
70
+ } or diag explain \@new ;
71
+ }
72
+
69
73
# #############################
70
74
# Try the simple engine and convenience interfaces...
71
75
0 commit comments