OSDN Git Service

Improved stability of the test result.
authorbeatles <beatles@b8c68f68-1e22-0410-b08e-880e1f8202b4>
Sun, 1 Nov 2009 13:32:34 +0000 (13:32 +0000)
committerbeatles <beatles@b8c68f68-1e22-0410-b08e-880e1f8202b4>
Sun, 1 Nov 2009 13:32:34 +0000 (13:32 +0000)
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)