1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
|
# frozen_string_literal: true
require 'simplecov'
require 'gettext-setup'
GettextSetup.initialize(File.join(File.dirname(__FILE__), 'fixtures', 'locales'))
SimpleCov.start do
add_filter '/spec/'
end
def cmd_present?(cmd)
# Try to call out to msgcmp, if it doesn't error, we have the tool
`#{cmd} --version`
true
rescue IOError
false
end
def msgcmp_present?
cmd_present?('msgcmp')
end
def msginit_present?
cmd_present?('msginit')
end
def msgmerge_present?
cmd_present?('msgmerge')
end
|