diff --git a/test/test_img_math.rb b/test/test_img_math.rb index 0f775dd75..8f1e49716 100644 --- a/test/test_img_math.rb +++ b/test/test_img_math.rb @@ -30,7 +30,7 @@ def test_defer_math_image_pathname end def test_defer_math_image - unless support_latex_in_tests? + unless support_latex_in_tests? && support_pdftocairo_in_tests? $stderr.puts 'skip test_defer_math_image' return true end @@ -108,4 +108,13 @@ def support_latex_in_tests? false end end + + def support_pdftocairo_in_tests? + begin + `pdftocairo -v` + true + rescue StandardError + false + end + end end