OSDN Git Service

Simplify estimated rate of unrated players (less memory).
[shogi-server/shogi-server.git] / test / TC_before_agree.rb
1 $:.unshift File.join(File.dirname(__FILE__), "..")
2 $topdir = File.expand_path File.dirname(__FILE__)
3 require "test/baseclient"
4 require "kconv"
5
6 class TestBeforeAgree < BaseClient
7
8   def test_gote_logout_after_sente_agree
9     login
10
11     @p1.puts "AGREE"
12     sleep 0.1
13     @p2.puts "LOGOUT"
14     @p1.wait /^REJECT/
15     @p2.wait /^REJECT/
16     assert true
17   end
18
19   def test_sente_logout_after_gote_agree
20     login
21
22     @p2.puts "AGREE"
23     sleep 0.1
24     @p1.puts "LOGOUT"
25     @p1.wait /^REJECT/
26     @p2.wait /^REJECT/
27     assert true
28   end
29
30   def test_gote_logout_before_sente_agree
31     login
32
33     sleep 0.1
34     @p2.puts "LOGOUT"
35     @p1.wait /^REJECT/
36     @p2.wait /^REJECT/
37     assert true
38   end
39
40   def test_sente_logout_before_gote_agree
41     login
42
43     sleep 0.1
44     @p1.puts "LOGOUT"
45     @p1.wait /^REJECT/
46     @p2.wait /^REJECT/
47     assert true
48   end
49 end