Skip to content

Commit 978e145

Browse files
committed
Add test for ruby.exe and Unicode characters on the command line
This is to verify the patch: oneclick/rubyinstaller2-packages@b0ae50d
1 parent b9f9950 commit 978e145

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

test/test_executables.rb

+9-3
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,16 @@ def test_ri
4444
assert_match(/A String object .* sequence of bytes/, `ri String 2>&1`)
4545
end
4646

47+
def test_ruby
48+
FileUtils.rm_f("test_ruby♥.log")
49+
system(%q[ruby -e "File.write(ARGV[0],'xy')" test_ruby♥.log])
50+
assert_equal("xy", File.read("test_ruby♥.log"))
51+
end
52+
4753
def test_rubyw
48-
FileUtils.rm_f("test_rubyw.log")
49-
system(%q[rubyw -e "File.write('test_rubyw.log','xy')"])
50-
assert_equal("xy", File.read("test_rubyw.log"))
54+
FileUtils.rm_f("test_rubyw.log")
55+
system(%q[rubyw -e "File.write(ARGV[0],'xy')" test_rubyw♥.log])
56+
assert_equal("xy", File.read("test_rubyw.log"))
5157
end
5258

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

0 commit comments

Comments
 (0)