OSDN Git Service

Improved stability of the test result.
[shogi-server/shogi-server.git] / test / TC_uchifuzume.rb
index 0107743..60922ac 100644 (file)
@@ -5,11 +5,11 @@ class UchifuzumeTest < ReadFileClient
   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
-    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)