| 91 | equal(previous(), 'a') |
| 92 | |
| 93 | def test_after_only(self): |
| 94 | # Also add punctuation 'noise' that should be ignored. |
| 95 | text = self.text |
| 96 | previous = self.auto_expand.getprevword |
| 97 | expand = self.auto_expand.expand_word_event |
| 98 | equal = self.assertEqual |
| 99 | |
| 100 | text.insert('insert', 'a, [ab] ac: () bx"" cd ac= ad ya') |
| 101 | text.mark_set('insert', '1.1') |
| 102 | equal(self.auto_expand.getwords(), ['ab', 'ac', 'ad', 'a']) |
| 103 | expand('event') |
| 104 | equal(previous(), 'ab') |
| 105 | expand('event') |
| 106 | equal(previous(), 'ac') |
| 107 | expand('event') |
| 108 | equal(previous(), 'ad') |
| 109 | expand('event') |
| 110 | equal(previous(), 'a') |
| 111 | |
| 112 | def test_both_before_after(self): |
| 113 | text = self.text |