Sha256: 30262a0476804bba07fb714b6c5ca204ce7f4144907696f2f228ee8c781c2cb8
Contents?: true
Size: 1.07 KB
Versions: 15
Compression:
Stored size: 1.07 KB
Contents
#!/usr/bin/env ruby require 'test/unit' require 'rubygems'; require 'require_relative' # 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
15 entries across 15 versions & 2 rubygems