def test_when_there_are_additional_keyword_chars_involved(self):
     actual_index = localcomplete.findstart_get_index_of_trailing_keyword(
             ':@', "abba y:u@hu")
     self.assertEqual(actual_index, 5)
 def test_return_None_if_there_is_no_keyword_before_the_cursor(self):
     actual_index = localcomplete.findstart_get_index_of_trailing_keyword(
             '', "abba ")
     self.assertEqual(actual_index, None)
 def test_find_the_visible_index_when_unicode_characters_are_involved(self):
     actual_index = localcomplete.findstart_get_index_of_trailing_keyword(
             u'', u"\u00fc\u00fc\u00fcber \u00fcberfu\u00df")
     self.assertEqual(actual_index, 7)
示例#4
0
 def test_when_there_are_additional_keyword_chars_involved(self):
     actual_index = localcomplete.findstart_get_index_of_trailing_keyword(
         ':@', "abba y:u@hu")
     self.assertEqual(actual_index, 5)
 def test_normal_keyword_in_the_middle(self):
     actual_index = localcomplete.findstart_get_index_of_trailing_keyword(
             '', "abba yuhu")
     self.assertEqual(actual_index, 5)
示例#6
0
 def test_find_the_visible_index_when_unicode_characters_are_involved(self):
     actual_index = localcomplete.findstart_get_index_of_trailing_keyword(
         u'', u"\u00fc\u00fc\u00fcber \u00fcberfu\u00df")
     self.assertEqual(actual_index, 7)
示例#7
0
 def test_return_None_if_there_is_no_keyword_before_the_cursor(self):
     actual_index = localcomplete.findstart_get_index_of_trailing_keyword(
         '', "abba ")
     self.assertEqual(actual_index, None)
示例#8
0
 def test_normal_keyword_in_the_middle(self):
     actual_index = localcomplete.findstart_get_index_of_trailing_keyword(
         '', "abba yuhu")
     self.assertEqual(actual_index, 5)
 def test_punctuation_as_prefix(self):
     actual_index = localcomplete.findstart_get_index_of_trailing_keyword(
         '@', "abba @yuhu")
     self.assertEqual(actual_index, 5)
 def test_when_escaping_is_needed(self):
     actual_index = localcomplete.findstart_get_index_of_trailing_keyword(
         '-\\', "abba y-u\\hu")
     self.assertEqual(actual_index, 5)