~ubuntu-dev/ubuntu/lucid/atheist/lucid-201002101911

« back to all changes in this revision

Viewing changes to examples/netcat.test

  • Committer: Bazaar Package Importer
  • Author(s): Cleto Martin Angelina
  • Date: 2009-09-06 11:56:09 UTC
  • Revision ID: james.westby@ubuntu.com-20090906115609-r4fl7q3n8vmc6s94
Tags: upstream-0.20090906
ImportĀ upstreamĀ versionĀ 0.20090906

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# -*- mode: python; coding: utf-8 -*-
 
2
 
 
3
cond = OpenPort(2000, proto='udp')
 
4
 
 
5
server = Test('nc -l -u -p 2000', detach=True, timeout=4, expected=-9)
 
6
server.pre += Not(cond.clone())
 
7
 
 
8
client = Test('nc -u localhost 2000 -c "echo hola"', shell=True)
 
9
client.pre += Poll(cond.clone())
 
10
client.terminates += server
 
11