Sha256: 1e606f1fba88f8132d53f6da0e137e4082b6cc203939456a6dc5922f87978c3e
Contents?: true
Size: 1.02 KB
Versions: 10
Compression:
Stored size: 1.02 KB
Contents
#!/usr/bin/env ruby require 'test/unit' # Unit test for io/tcpclient.rb and io/tcpserver.rb together require_relative '../../io/tcpfns' require_relative '../../io/tcpclient' require_relative '../../io/tcpserver' # Tests TCPServer together with and TCPClient class TestTCPClientServer < Test::Unit::TestCase def test_client_server server = Trepan::TCPDbgServer.new({ :open => true, :port => 1028, :host => 'localhost' }) client = Trepan::TCPDbgClient.new({ :open => true, :port => 1028, :host => 'localhost' }) %w(one, two, three).each do |line| server.writeline(line) assert_equal line, client.read_msg.chomp end %w(four, five, six).each do |line| client.writeline(line) assert_equal line, server.read_msg.chomp end client.close server.close end end
Version data entries
10 entries across 10 versions & 1 rubygems