OSDN Git Service

Changed the directory name
[shogi-server/shogi-server.git] / test / TC_jishogi_kachi.rb
1 require "baseclient"
2 include Socket::Constants
3
4 class JishogiTest < ReadFileClient
5   def test_jishogi_kachi
6     csa = File.open(filepath("jishogi_kachi.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(/#JISHOGI.#LOSE/m, result1)
14     assert_match(/#JISHOGI.#WIN/m, result2)
15   end
16 end # Client class