Skip to content

Commit

Permalink
Add test for ruby.exe and Unicode characters on the command line
Browse files Browse the repository at this point in the history
This is to verify the patch:
oneclick/rubyinstaller2-packages@b0ae50d
  • Loading branch information
larskanis committed Nov 9, 2024
1 parent b9f9950 commit 978e145
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions test/test_executables.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,16 @@ def test_ri
assert_match(/A String object .* sequence of bytes/, `ri String 2>&1`)
end

def test_ruby
FileUtils.rm_f("test_ruby♥.log")
system(%q[ruby -e "File.write(ARGV[0],'xy')" test_ruby♥.log])
assert_equal("xy", File.read("test_ruby♥.log"))
end

def test_rubyw
FileUtils.rm_f("test_rubyw.log")
system(%q[rubyw -e "File.write('test_rubyw.log','xy')"])
assert_equal("xy", File.read("test_rubyw.log"))
FileUtils.rm_f("test_rubyw.log")
system(%q[rubyw -e "File.write(ARGV[0],'xy')" test_rubyw♥.log])
assert_equal("xy", File.read("test_rubyw.log"))
end

unless RUBY_VERSION =~ /^2\.[3456]\./
Expand Down

0 comments on commit 978e145

Please sign in to comment.