From 7325bed2b45bc7678b95e1f79e151a7a779f7484 Mon Sep 17 00:00:00 2001 From: Kazuhiro NISHIYAMA Date: Wed, 17 Jun 2020 12:08:34 +0900 Subject: [PATCH] Show filesystem encoding in failure message MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `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"]>. ``` --- test/webrick/test_filehandler.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/webrick/test_filehandler.rb b/test/webrick/test_filehandler.rb index 821d91b3cd..807e96bd18 100644 --- a/test/webrick/test_filehandler.rb +++ b/test/webrick/test_filehandler.rb @@ -295,7 +295,7 @@ class WEBrick::TestFileHandler < Test::Unit::TestCase 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