• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Aucun tag

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

shogi-server source


Commit MetaInfo

Révisiond3ed2b0e9930dcb84217090d51f93fc5075e098d (tree)
l'heure2011-12-04 14:30:05
AuteurDaigo Moriwaki <beatles@user...>
CommiterDaigo Moriwaki

Message de Log

Explicit file encoding.

Change Summary

Modification

--- a/test/TC_uchifuzume.rb
+++ b/test/TC_uchifuzume.rb
@@ -1,9 +1,11 @@
1-require "baseclient"
1+$:.unshift File.join(File.dirname(__FILE__), "..")
2+$topdir = File.expand_path File.dirname(__FILE__)
3+require "test/baseclient"
24 include Socket::Constants
35
46 class UchifuzumeTest < ReadFileClient
57 def test_uchifuzume
6- csa = File.open(filepath("uchifuzume.csa")) {|f| f.read}
8+ csa = File.read(filepath("uchifuzume.csa"), :encoding => Encoding::Shift_JIS)
79 handshake(csa)
810 @p2.puts "-0064FU"
911 @p1.puts "%TORYO"
@@ -14,7 +16,7 @@ class UchifuzumeTest < ReadFileClient
1416 end
1517
1618 def test_not_uchifuzume
17- csa = File.open(filepath("not_uchifuzume.csa")) {|f| f.read}
19+ csa = File.read(filepath("not_uchifuzume.csa"), :encoding => Encoding::Shift_JIS)
1820 handshake(csa)
1921 @p2.puts "-0092FU"
2022 @p1.puts "%TORYO"