Fix font path for Catalina (#45506)
* batik: fix test for macOS Catalina * go-statik: fix test for macOS Catalina * ttf2eot: fix test for macOS Catalina * lcdf-typetools: fix test for macOS Catalina
This commit is contained in:
parent
532844b5f2
commit
ae6ddec546
4 changed files with 11 additions and 8 deletions
|
@ -14,8 +14,9 @@ class Batik < Formula
|
|||
end
|
||||
|
||||
test do
|
||||
system bin/"batik-ttf2svg", "/Library/Fonts/Webdings.ttf", "-autorange",
|
||||
"-o", "Webdings.svg", "-testcard"
|
||||
assert_match "abcdefghijklmnopqrstuvwxyz", File.read("Webdings.svg")
|
||||
font_name = (MacOS.version >= :catalina) ? "Arial Unicode.ttf" : "Arial.ttf"
|
||||
system bin/"batik-ttf2svg", "/Library/Fonts/#{font_name}", "-autorange",
|
||||
"-o", "Arial.svg", "-testcard"
|
||||
assert_match "abcdefghijklmnopqrstuvwxyz", File.read("Arial.svg")
|
||||
end
|
||||
end
|
||||
|
|
|
@ -27,7 +27,8 @@ class GoStatik < Formula
|
|||
end
|
||||
|
||||
test do
|
||||
system bin/"statik", "-src", "/Library/Fonts/STIXGeneral.otf"
|
||||
font_name = (MacOS.version >= :catalina) ? "Arial Unicode.ttf" : "Arial.ttf"
|
||||
system bin/"statik", "-src", "/Library/Fonts/#{font_name}"
|
||||
assert_predicate testpath/"statik/statik.go", :exist?
|
||||
refute_predicate (testpath/"statik/statik.go").size, :zero?
|
||||
end
|
||||
|
|
|
@ -18,7 +18,7 @@ class LcdfTypetools < Formula
|
|||
end
|
||||
|
||||
test do
|
||||
assert_match "STIXGeneral-Regular",
|
||||
shell_output("#{bin}/otfinfo -p /Library/Fonts/STIXGeneral.otf")
|
||||
font_name = (MacOS.version >= :catalina) ? "Arial\\ Unicode.ttf" : "Arial.ttf"
|
||||
assert_include shell_output("#{bin}/otfinfo -p /Library/Fonts/#{font_name}"), "Arial"
|
||||
end
|
||||
end
|
||||
|
|
|
@ -19,8 +19,9 @@ class Ttf2eot < Formula
|
|||
end
|
||||
|
||||
test do
|
||||
cp "/Library/Fonts/Arial.ttf", testpath
|
||||
system("#{bin}/ttf2eot < Arial.ttf > Arial.eot")
|
||||
font_name = (MacOS.version >= :catalina) ? "Arial Unicode.ttf" : "Arial.ttf"
|
||||
cp "/Library/Fonts/#{font_name}", testpath
|
||||
system("#{bin}/ttf2eot < '#{font_name}' > Arial.eot")
|
||||
assert_predicate testpath/"Arial.eot", :exist?
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue