diff options
author | Damien George <damien.p.george@gmail.com> | 2015-04-04 23:16:22 +0100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2015-04-04 23:16:22 +0100 |
commit | 97abe22963af5b62656cef5a46c195215f75f7d2 (patch) | |
tree | 40929dd2cac2ee1e03af4edd5d3fb870f9ac989f /tests/basics/string1.py | |
parent | 9dd36404646f857c4f250537bac0d9a8ad041d25 (diff) | |
download | micropython-97abe22963af5b62656cef5a46c195215f75f7d2.tar.gz micropython-97abe22963af5b62656cef5a46c195215f75f7d2.zip |
tests: Add tests to exercise lexer; and some more complex number tests.
Diffstat (limited to 'tests/basics/string1.py')
-rw-r--r-- | tests/basics/string1.py | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/tests/basics/string1.py b/tests/basics/string1.py index f58fcd401a..8d5f4618dc 100644 --- a/tests/basics/string1.py +++ b/tests/basics/string1.py @@ -1,17 +1,27 @@ # basic strings +# literals +print('abc') +print(r'abc') +print(u'abc') +print(repr('\a\b\t\n\v\f\r')) +print('\z') # unrecognised escape char + +# construction print(str()) +print(str('abc')) +# inplace addition x = 'abc' print(x) - x += 'def' print(x) +# binary ops print('123' + "456") - print('123' * 5) +# subscription print('abc'[1]) print('abc'[-1]) try: |