Skip to content

Commit

Permalink
Added a test that segfaulted with the incorrect stack handling in red…
Browse files Browse the repository at this point in the history
…irected

print statements, but now passes.
  • Loading branch information
hathawsh committed Jun 22, 2001
1 parent 53d0cde commit 16ac10e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/restricted_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ def print1():
print 'world!',
return printed

def printStuff():
print 'a', 'b', 'c',
return printed

def printToNone():
x = None
print >>x, 'Hello, world!',
Expand Down
4 changes: 4 additions & 0 deletions tests/testRestrictions.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,10 @@ def checkPrintToNone(self):
else:
assert 0, res

def checkPrintStuff(self):
res = self.execFunc('printStuff')
assert res == 'a b c', res

def checkPrintLines(self):
res = self.execFunc('printLines')
assert res == '0 1 2\n3 4 5\n6 7 8\n', res
Expand Down

0 comments on commit 16ac10e

Please sign in to comment.