1.1 --- a/tests/string.py Sun Jan 29 01:33:14 2017 +0100
1.2 +++ b/tests/string.py Sun Jan 29 18:52:35 2017 +0100
1.3 @@ -18,7 +18,7 @@
1.4 try:
1.5 print s.index("p") # should raise an exception
1.6 except ValueError, exc:
1.7 - print 's.index("p"): value is not appropriate', exc.value
1.8 + print 's.index("p"): value is not appropriate', repr(exc.value)
1.9
1.10 print s.startswith("Hello") # True
1.11 print s.startswith("world") # False
1.12 @@ -43,7 +43,7 @@
1.13 try:
1.14 print ord(s) # should raise an exception
1.15 except ValueError, exc:
1.16 - print "ord(s): value is not appropriate", exc.value
1.17 + print "ord(s): value is not appropriate", repr(exc.value)
1.18
1.19 l = ["Hello", "world!"]
1.20 s3 = " ".join(l)
1.21 @@ -101,3 +101,7 @@
1.22 print repr(s9.strip("xyYZ")) # "zHello worldX"
1.23 print repr(s9.lstrip("xyYZ")) # "zHello worldXYZ"
1.24 print repr(s9.rstrip("xyYZ")) # "xyzHello worldX"
1.25 +
1.26 +# Test quoting of strings.
1.27 +
1.28 +print repr('æ\nø\rå\t"') # "\xe6\n\xf8\r\xe5\t\""