From 202dfa1d58c08fcb9d4b18f9682197a03d5078e7 Mon Sep 17 00:00:00 2001 From: takahashim Date: Mon, 28 Feb 2022 01:34:28 +0900 Subject: [PATCH] Skip tests without pdftocairo --- test/test_img_math.rb | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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