OSDN Git Service

[shogi-server] Enhance capability of Floodgate configuration file
[shogi-server/shogi-server.git] / test / TC_oute_sennichite.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 class OuteSennichiteTest < ReadFileClient
7   def test_oute_sennichite
8     csa = File.open(filepath("oute_sennichite.csa")) {|f| f.read}
9     handshake(csa)
10     @p1.wait(/#OUTE_SENNICHITE.#LOSE/m)
11     @p2.wait(/#OUTE_SENNICHITE.#WIN/m)
12     assert true
13     logout12
14   end
15
16   def test_oute_sennichite2
17     csa = File.open(filepath("oute_sennichite2.csa")) {|f| f.read}
18     handshake(csa)
19     @p1.wait(/#OUTE_SENNICHITE.#WIN/m)
20     @p2.wait(/#OUTE_SENNICHITE.#LOSE/m)
21     assert true
22     logout12
23   end
24
25   def test_oute_sennichite3
26     csa = File.open(filepath("oute_sennichite3.csa")) {|f| f.read}
27     handshake(csa)
28     @p1.wait(/#OUTE_SENNICHITE.#LOSE/m)
29     @p2.wait(/#OUTE_SENNICHITE.#WIN/m)
30     assert true
31     logout12
32   end
33 end # Client class
34