mirror of
https://github.com/ggerganov/whisper.cpp.git
synced 2024-12-18 20:27:53 +00:00
ruby : fix installation test (#2519)
This commit is contained in:
parent
d4bc413505
commit
850f7b19d3
@ -18,11 +18,13 @@ class TestPackage < Test::Unit::TestCase
|
||||
end
|
||||
|
||||
def test_install
|
||||
filename = `rake -Tbuild`.match(/(whispercpp-(?:.+)\.gem)/)[1]
|
||||
match_data = `rake -Tbuild`.match(/(whispercpp-(.+)\.gem)/)
|
||||
filename = match_data[1]
|
||||
version = match_data[2]
|
||||
basename = "whisper.#{RbConfig::CONFIG["DLEXT"]}"
|
||||
Dir.mktmpdir do |dir|
|
||||
system "gem", "install", "--install-dir", dir.shellescape, "pkg/#{filename.shellescape}", exception: true
|
||||
assert_path_exist File.join(dir, "gems/whispercpp-1.3.0/lib", basename)
|
||||
assert_path_exist File.join(dir, "gems/whispercpp-#{version}/lib", basename)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user