Skip to content

Commit

Permalink
fix for windows; use File.binwrite instead of File.write
Browse files Browse the repository at this point in the history
  • Loading branch information
takahashim committed Nov 7, 2015
1 parent 1efcbe5 commit c06c4cf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/test_aozora2html.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def test_aozora2html_new
Dir.mktmpdir do |dir|
input = File.join(dir,'dummy.txt')
output = File.join(dir,'dummy2.txt')
File.write(input, "テスト\r\n")
File.binwrite(input, "テスト\r\n")
parser = Aozora2Html.new(input, output)
begin
assert_equal Aozora2Html, parser.class
Expand All @@ -26,7 +26,7 @@ def test_scount
Dir.mktmpdir do |dir|
input = File.join(dir,'dummy.txt')
output = File.join(dir,'dummy2.txt')
File.write(input, "a\r\nb\r\nc\r\n")
File.binwrite(input, "a\r\nb\r\nc\r\n")
parser = Aozora2Html.new(input, output)

begin
Expand Down Expand Up @@ -56,7 +56,7 @@ def test_read_line
Dir.mktmpdir do |dir|
input = File.join(dir,'dummy.txt')
output = File.join(dir,'dummy2.txt')
File.write(input, "ab\r\nc\r\n")
File.binwrite(input, "ab\r\nc\r\n")
parser = Aozora2Html.new(input, output)
begin
parsed = parser.read_line
Expand All @@ -71,7 +71,7 @@ def test_char_type
Dir.mktmpdir do |dir|
input = File.join(dir,'dummy.txt')
output = File.join(dir,'dummy2.txt')
File.write(input, "ab\r\nc\r\n")
File.binwrite(input, "ab\r\nc\r\n")
parser = Aozora2Html.new(input, output)

begin
Expand Down

0 comments on commit c06c4cf

Please sign in to comment.