OSDN Git Service

[shogi-server] shogi-server, shogi_server/{command,game_result,player}.rb: The change...
[shogi-server/shogi-server.git] / test / TC_jishogi_kachi.rb
1 $:.unshift File.join(File.dirname(__FILE__), "..")
2 $topdir = File.expand_path File.dirname(__FILE__)
3 require "test/baseclient"
4 include Socket::Constants
5
6 # This game has more thatn 256 moves.
7 # Disableing max-moves, "./shogi-server --max moves 0", is required.
8
9 class JishogiTest < ReadFileClient
10   def test_jishogi_kachi
11     csa = File.open(filepath("jishogi_kachi.csa")) {|f| f.read}
12     handshake(csa)
13     @p2.puts "%KACHI"
14     @p1.wait(/#JISHOGI\n#LOSE/)
15     @p2.wait(/#JISHOGI\n#WIN/)
16     assert true
17     logout12
18   end
19 end # Client class