OSDN Git Service

855c06539a7cdef5b517af82278bebdcda258d1d
[shogi-server/shogi-server.git] / test / TC_oute_sennichite.rb
1 require "baseclient"
2 include Socket::Constants
3
4 class OuteSennichiteTest < ReadFileClient
5   def test_oute_sennichite
6     csa = File.open(filepath("oute_sennichite.csa")) {|f| f.read}
7     handshake(csa)
8     #cmd2 "%KACHI"
9     sleep 1
10     result1 = read_nonblock(@socket1)
11     result2 = read_nonblock(@socket2)
12     logout12
13     assert_match(/#OUTE_SENNICHITE.#LOSE/m, result1)
14     assert_match(/#OUTE_SENNICHITE.#WIN/m, result2)
15   end
16 end # Client class
17