blob: 7db2275e7ee4b6cf9a17a3a855a5089d6d951714 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
#!/usr/bin/env python
# **********************************************************************
#
# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved.
#
# This copy of Ice is licensed to you under the terms described in the
# ICE_LICENSE file included in this distribution.
#
# **********************************************************************
import sys
from demoscript import *
def run(client, server, ruby = False):
print "testing...",
sys.stdout.flush()
client.expect('press enter')
client.sendline('')
client.expect('==> a message 4 u.*press enter')
client.sendline('')
if not ruby:
client.expect('NoObjectFactoryException.*press enter')
client.sendline('')
client.expect('==> Ice rulez!.*press enter')
client.sendline('')
client.expect('==> !zelur ecI.*press enter')
client.sendline('')
client.expect('press enter')
server.expect('!zelur ecI')
client.sendline('')
if ruby:
client.expect('==> The type ID of the received object is "::Demo::DerivedPrinter".*press enter')
client.sendline('')
client.expect('==> undefined method')
client.sendline('')
else:
client.expect('==> The type ID of the received object is "::Demo::Printer".*press enter')
client.sendline('')
client.expect('==> The type ID of the received object is "::Demo::DerivedPrinter".*press enter')
client.sendline('')
client.expect('==> a derived message 4 u\n==> A DERIVED MESSAGE 4 U.*press enter')
client.sendline('')
client.expect('==> a derived message 4 u\n==> A DERIVED MESSAGE 4 U')
print "ok"
server.waitTestSuccess()
client.waitTestSuccess()
|