2015-12-20 | Paul Boddie | file changeset files shortlog | Minor help and test updates. |
paul@1 | 1 | #!/usr/bin/env python |
paul@1 | 2 | |
paul@23 | 3 | from ImprovedTableParser import patterns |
paul@1 | 4 | |
paul@1 | 5 | text = """ |
paul@23 | 6 | {{{{{ |
paul@1 | 7 | Hello |
paul@23 | 8 | {{{{ |
paul@1 | 9 | Hello again |
paul@23 | 10 | And also {{{ this }}} |
paul@23 | 11 | {{{ |
paul@1 | 12 | And once again |
paul@23 | 13 | }}} |
paul@1 | 14 | And again |
paul@23 | 15 | }}}} |
paul@1 | 16 | again |
paul@23 | 17 | }}}} |
paul@1 | 18 | """ |
paul@1 | 19 | |
paul@23 | 20 | matches = patterns["markers"].split(text) |
paul@23 | 21 | expected = 17 |
paul@1 | 22 | |
paul@1 | 23 | print text |
paul@1 | 24 | print |
paul@23 | 25 | print matches |
paul@23 | 26 | print |
paul@23 | 27 | print len(matches) == expected, ": length is", len(matches), "==", expected |
paul@1 | 28 | |
paul@1 | 29 | # vim: tabstop=4 expandtab shiftwidth=4 |