Brian Silverman | b67da23 | 2015-09-12 23:50:30 -0400 | [diff] [blame^] | 1 | # 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 |
| 6 | raise unless require_relative 'ruby_to_require.rb' |
| 7 | raise unless $loaded |
| 8 | |
| 9 | # We already loaded this above, so it won't happen again. |
| 10 | raise if require 'build_tests/ruby_to_require' |
| 11 | |
| 12 | $loaded = false |
| 13 | raise unless require ARGV[0] + '/build_tests/ruby_to_require' |
| 14 | raise unless $loaded |
| 15 | |
| 16 | raise unless ''.encoding == Encoding::UTF_8 |
| 17 | |
| 18 | puts 'Hi from ruby' |