~pyreadline/pyreadline/trunk

« back to all changes in this revision

Viewing changes to pyreadline/test/test_history.py

  • Committer: Jorgen Stenarson
  • Date: 2011-04-14 18:36:47 UTC
  • Revision ID: jorgen.stenarson@bostream.nu-20110414183647-4ki7dybb2mbb6z8g
Finalizing incremental search

Show diffs side-by-side

added added

removed removed

Lines of Context:
112
112
 
113
113
    def test_forward_1(self):
114
114
        q = self.q
115
 
        self.assertEqual(q.forward_search_history(u"a"), u"") 
 
115
        self.assertEqual(q.forward_search_history(u"a"), u"ako") 
116
116
 
117
117
    def test_forward_2(self):
118
118
        q = self.q
124
124
        self.assertEqual(q.forward_search_history(u"ak"), u"akca") 
125
125
        self.assertEqual(q.forward_search_history(u"ako"), u"ako") 
126
126
        
 
127
class Test_empty_history_search_incr_fwd_backwd(unittest.TestCase):
 
128
    def setUp(self):
 
129
        self.q = q = LineHistory()
 
130
 
 
131
    def test_backward_1(self):
 
132
        q = self.q
 
133
        self.assertEqual(q.reverse_search_history(u"b"), u"") 
 
134
 
 
135
    def test_forward_1(self):
 
136
        q = self.q
 
137
        self.assertEqual(q.forward_search_history(u"a"), u"") 
 
138
 
127
139
 
128
140
#----------------------------------------------------------------------
129
141
# utility functions