Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / tools / src / nas,5.n2.os.2 / lib / python / lib / python2.4 / test / test_softspace.py
CommitLineData
86530b38
AT
1from test import test_support
2import StringIO
3
4# SF bug 480215: softspace confused in nested print
5f = StringIO.StringIO()
6class C:
7 def __str__(self):
8 print >> f, 'a'
9 return 'b'
10
11print >> f, C(), 'c ', 'd\t', 'e'
12print >> f, 'f', 'g'
13# In 2.2 & earlier, this printed ' a\nbc d\te\nf g\n'
14test_support.vereq(f.getvalue(), 'a\nb c d\te\nf g\n')