Skip to content

Commit

Permalink
Show filesystem encoding in failure message
Browse files Browse the repository at this point in the history
`test_cjk_in_path` failed on mswinci yet.

https://rubyci.org/logs/mswinci.japaneast.cloudapp.azure.com/vc12-x64/ruby-master/log/20200616T192319Z.fail.html.gz
```
  1) Failure:
WEBrick::TestFileHandler#test_cjk_in_path [D:/tmp/mswin-build20200617-120024-1brdn58/ruby/test/webrick/utils.rb:72]:
exceptions on 2 threads:
webrick log start:
  [2020-06-17 06:12:53] ERROR `/あ.txt' not found.

webrick log end.
<"200"> expected but was
<"404">.
---
<[]> expected but was
<["[2020-06-17 06:12:53] ERROR `/\xE3\x81\x82.txt' not found.\n"]>.
```
  • Loading branch information
znz committed Jun 17, 2020
1 parent af6e63a commit 7325bed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/webrick/test_filehandler.rb
Expand Up @@ -295,7 +295,7 @@ def test_cjk_in_path
TestWEBrick.start_httpserver(config) do |server, addr, port, log|
http = Net::HTTP.new(addr, port)
req = Net::HTTP::Get.new("/%E3%81%82.txt")
http.request(req){|res| assert_equal("200", res.code, log.call) }
http.request(req){|res| assert_equal("200", res.code, log.call + "\nFilesystem encoding is #{Encoding.find('filesystem')}") }
end
end
end
Expand Down

0 comments on commit 7325bed

Please sign in to comment.