OSDN Git Service

test_not_uchifuzume was not erronously executed. Now the method is tested.
[shogi-server/shogi-server.git] / test / TC_uchifuzume.rb
index 0107743..97b86b3 100644 (file)
@@ -5,17 +5,17 @@ class UchifuzumeTest < ReadFileClient
   def test_uchifuzume
     csa = File.open(filepath("uchifuzume.csa")) {|f| f.read}
     handshake(csa)
   def test_uchifuzume
     csa = File.open(filepath("uchifuzume.csa")) {|f| f.read}
     handshake(csa)
-    cmd2 "-0064FU"
-    cmd  "%TORYO"
+    result2 = cmd2 "-0064FU"
+    result1 = cmd  "%TORYO"
     sleep 1
     sleep 1
-    result1 = read_nonblock(@socket1)
-    result2 = read_nonblock(@socket2)
+    result1 += read_nonblock(@socket1)
+    result2 += read_nonblock(@socket2)
     logout12
     assert_match(/#ILLEGAL_MOVE.*#WIN/m, result1)
     assert_match(/#ILLEGAL_MOVE.*#LOSE/m, result2)
   end
 
     logout12
     assert_match(/#ILLEGAL_MOVE.*#WIN/m, result1)
     assert_match(/#ILLEGAL_MOVE.*#LOSE/m, result2)
   end
 
-  def est_not_uchifuzume
+  def test_not_uchifuzume
     csa = File.open(filepath("not_uchifuzume.csa")) {|f| f.read}
     handshake(csa)
     cmd2 "-0092FU"
     csa = File.open(filepath("not_uchifuzume.csa")) {|f| f.read}
     handshake(csa)
     cmd2 "-0092FU"