1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/tests/test_tokens.py Fri Dec 20 23:25:44 2013 +0100
1.3 @@ -0,0 +1,19 @@
1.4 +#!/usr/bin/env python
1.5 +
1.6 +from TokenSupport import getIdentifiers
1.7 +
1.8 +tests = [
1.9 + (1, False, """'contains space'""", ["contains space"]),
1.10 + (2, False, """contains space""", ["contains", "space"]),
1.11 + (1, False, '''"Python's syntax"''', ["Python's syntax"]),
1.12 + (2, False, """Python''s syntax""", ["Pythons", "syntax"]),
1.13 + (2, True, """Python''s syntax""", ["Python's", "syntax"]),
1.14 + (1, False, '''"Python's "'"intuitive" syntax' ''', ['''Python's "intuitive" syntax''']),
1.15 + (1, False, '''"Python's "intuitive" syntax" ''', ['''Python's intuitive syntax''']),
1.16 + ]
1.17 +
1.18 +for n, doubling, s, e in tests:
1.19 + l = getIdentifiers(s, doubling)
1.20 + print l == e, l, "==", e, len(l) == n, len(l), "==", n, "<-", doubling, s
1.21 +
1.22 +# vim: tabstop=4 expandtab shiftwidth=4