summaryrefslogtreecommitdiffstats
path: root/wintest
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-12-01 13:24:35 +1100
committerAndrew Tridgell <tridge@samba.org>2010-12-01 16:09:57 +1100
commita36e4b28c7970b2248f9722498f68fa8707b024e (patch)
tree9b3c9d8b554f284b4b3ddab3d27f348c1b10ff65 /wintest
parent380739e9bec7c67e57f277ed170e3c4b7787806a (diff)
downloadsamba-a36e4b28c7970b2248f9722498f68fa8707b024e.tar.gz
samba-a36e4b28c7970b2248f9722498f68fa8707b024e.tar.xz
samba-a36e4b28c7970b2248f9722498f68fa8707b024e.zip
wintest: fixed casefold handling in expect calls
Diffstat (limited to 'wintest')
-rw-r--r--wintest/wintest.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/wintest/wintest.py b/wintest/wintest.py
index cc24c0d22a6..201ed089e2a 100644
--- a/wintest/wintest.py
+++ b/wintest/wintest.py
@@ -231,7 +231,12 @@ class wintest():
def expect_sub(line, timeout=ret.timeout, casefold=casefold):
line = self.substitute(line)
if casefold:
- line = "(?i)" + line
+ if isinstance(line, list):
+ for i in range(len(line)):
+ if isinstance(line[i], str):
+ line[i] = '(?i)' + line[i]
+ elif isinstance(line, str):
+ line = '(?i)' + line
return ret.old_expect(line, timeout=timeout)
ret.old_sendline = ret.sendline