Squashed 'libs/protobuf/' content from commit fcd3b9a85

git-subtree-dir: libs/protobuf
git-subtree-split: fcd3b9a85ef36e46643dc30176cea1a7ad62e02b
This commit is contained in:
Henry Winkel
2022-10-22 14:46:58 +02:00
commit 36bca61764
2186 changed files with 838730 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
#!/usr/bin/ruby
# Test that Kokoro is using the expected version of ruby.
require 'test/unit'
class RubyVersionTest < Test::Unit::TestCase
def test_ruby_version
return if RUBY_PLATFORM == "java"
if not ENV["KOKORO_RUBY_VERSION"]
STDERR.puts("No kokoro ruby version found, skipping check")
return
end
actual = RUBY_VERSION
expected = ENV["KOKORO_RUBY_VERSION"].delete_prefix("ruby-")
assert actual.start_with?(expected), "Version #{actual} found, expecting #{expected}"
end
def test_jruby_version
return if RUBY_PLATFORM != "java"
if not ENV["KOKORO_RUBY_VERSION"]
STDERR.puts("No kokoro ruby version found, skipping check")
return
end
expected = ENV["KOKORO_RUBY_VERSION"].delete_prefix("jruby-")
actual = JRUBY_VERSION
assert actual.start_with?(expected), "Version #{actual} found, expecting #{expected}"
end
end