[llvm-commits] [llvm] r81194 - in /llvm/trunk/utils/lit: ShCommands.py TclUtil.py
Daniel Dunbar
daniel at zuster.org
Mon Sep 7 22:46:28 PDT 2009
Author: ddunbar
Date: Tue Sep 8 00:46:28 2009
New Revision: 81194
URL: http://llvm.org/viewvc/llvm-project?rev=81194&view=rev
Log:
Fix typo that worked on python 2.6.
Also, fix unit tests.
Modified:
llvm/trunk/utils/lit/ShCommands.py
llvm/trunk/utils/lit/TclUtil.py
Modified: llvm/trunk/utils/lit/ShCommands.py
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/ShCommands.py?rev=81194&r1=81193&r2=81194&view=diff
==============================================================================
--- llvm/trunk/utils/lit/ShCommands.py (original)
+++ llvm/trunk/utils/lit/ShCommands.py Tue Sep 8 00:46:28 2009
@@ -1,5 +1,3 @@
-import ShUtil
-
class Command:
def __init__(self, args, redirects):
self.args = list(args)
@@ -26,6 +24,7 @@
print >>file, quoted,
# For debugging / validation.
+ import ShUtil
dequoted = list(ShUtil.ShLexer(quoted).lex())
if dequoted != [arg]:
raise NotImplementedError,'Unable to quote %r' % arg
Modified: llvm/trunk/utils/lit/TclUtil.py
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/TclUtil.py?rev=81194&r1=81193&r2=81194&view=diff
==============================================================================
--- llvm/trunk/utils/lit/TclUtil.py (original)
+++ llvm/trunk/utils/lit/TclUtil.py Tue Sep 8 00:46:28 2009
@@ -184,7 +184,7 @@
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 @@
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)))
More information about the llvm-commits
mailing list