blob: 12af7fe5a094b316ae1ab34e96a89fbb0176c91e [file] [log] [blame]
Brian Silvermanb67da232015-09-12 23:50:30 -04001# ruby_check.sh runs this and verifies the output matches.
2# The first argument is the absolute path to the runfiles directory to use for
3# testing require with an absolute path.
4
5$loaded = false
6raise unless require_relative 'ruby_to_require.rb'
7raise unless $loaded
8
9# We already loaded this above, so it won't happen again.
10raise if require 'build_tests/ruby_to_require'
11
12$loaded = false
13raise unless require ARGV[0] + '/build_tests/ruby_to_require'
14raise unless $loaded
15
16raise unless ''.encoding == Encoding::UTF_8
17
18puts 'Hi from ruby'