Spaces:
Running
Running
ruby : fix installation test (#2519)
Browse files
bindings/ruby/tests/test_package.rb
CHANGED
|
@@ -18,11 +18,13 @@ class TestPackage < Test::Unit::TestCase
|
|
| 18 |
end
|
| 19 |
|
| 20 |
def test_install
|
| 21 |
-
|
|
|
|
|
|
|
| 22 |
basename = "whisper.#{RbConfig::CONFIG["DLEXT"]}"
|
| 23 |
Dir.mktmpdir do |dir|
|
| 24 |
system "gem", "install", "--install-dir", dir.shellescape, "pkg/#{filename.shellescape}", exception: true
|
| 25 |
-
assert_path_exist File.join(dir, "gems/whispercpp
|
| 26 |
end
|
| 27 |
end
|
| 28 |
end
|
|
|
|
| 18 |
end
|
| 19 |
|
| 20 |
def test_install
|
| 21 |
+
match_data = `rake -Tbuild`.match(/(whispercpp-(.+)\.gem)/)
|
| 22 |
+
filename = match_data[1]
|
| 23 |
+
version = match_data[2]
|
| 24 |
basename = "whisper.#{RbConfig::CONFIG["DLEXT"]}"
|
| 25 |
Dir.mktmpdir do |dir|
|
| 26 |
system "gem", "install", "--install-dir", dir.shellescape, "pkg/#{filename.shellescape}", exception: true
|
| 27 |
+
assert_path_exist File.join(dir, "gems/whispercpp-#{version}/lib", basename)
|
| 28 |
end
|
| 29 |
end
|
| 30 |
end
|