aboutsummaryrefslogtreecommitdiff
path: root/utils/lit/TclUtil.py
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-09-08 05:46:28 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-09-08 05:46:28 +0000
commitba3931b667ea2c8f30dff4cd176a106d6d4cb51c (patch)
treed3d68971ab8738bea25b129115d43c8c3007740f /utils/lit/TclUtil.py
parent8f5075b966114575cf0cb1f4875fdc82948ffc02 (diff)
Fix typo that worked on python 2.6.
Also, fix unit tests. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81194 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/lit/TclUtil.py')
-rw-r--r--utils/lit/TclUtil.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/utils/lit/TclUtil.py b/utils/lit/TclUtil.py
index da7659de85..4a3f34508d 100644
--- a/utils/lit/TclUtil.py
+++ b/utils/lit/TclUtil.py
@@ -184,7 +184,7 @@ class TclExecCommand:
def parse_redirect(self, tok, length):
if len(tok) == length:
arg = self.lex()
- if next is None:
+ if arg is None:
raise ValueError,'Missing argument to %r redirection' % tok
else:
tok,arg = tok[:length],tok[length:]
@@ -310,11 +310,11 @@ class TestTclExecCommand(unittest.TestCase):
self.assertEqual(self.parse('echo hello > a >b >>c 2> d |& e'),
(False, False,
Pipeline([Command(['echo', 'hello'],
- [(('>',),'a'),
+ [(('>&',2),'1'),
+ (('>',),'a'),
(('>',),'b'),
(('>>',),'c'),
- (('>',2),'d'),
- (('>&',2),'1')]),
+ (('>',2),'d')]),
Command(['e'], [])],
False, True)))