Пример #1
0
 def test_backslashes_for_windows_paths(self, windows_haystack):
     # https://github.com/wting/autojump/issues/281
     assert list(match_anywhere(['foo', 'baz'], windows_haystack)) \
         == [self.win_entry1]
     assert list(match_anywhere(['program', 'gimp'], windows_haystack, True)) \
         == [self.win_entry2]
     assert list(match_anywhere(['win', '32'], windows_haystack, True)) \
         == [self.win_entry3]
Пример #2
0
 def test_backslashes_for_windows_paths(self, windows_haystack):
     # https://github.com/wting/autojump/issues/281
     assert list(match_anywhere(['foo', 'baz'], windows_haystack)) \
         == [self.win_entry1]
     assert list(match_anywhere(['program', 'gimp'], windows_haystack, True)) \
         == [self.win_entry2]
     assert list(match_anywhere(['win', '32'], windows_haystack, True)) \
         == [self.win_entry3]
Пример #3
0
 def test_wildcard_in_needle(self, haystack):
     # https://github.com/wting/autojump/issues/402
     assert list(match_anywhere(['*', 'this'], haystack)) == []
     assert list(match_anywhere(['this', '*'], haystack)) == [self.entry5]
Пример #4
0
 def test_ignore_case(self, haystack):
     assert list(match_anywhere(['bAz', 'bAR'], haystack, ignore_case=True)) \
         == [self.entry2]
Пример #5
0
 def test_skip(self, haystack):
     assert list(match_anywhere(['baz', 'bar'], haystack)) == [self.entry2]
     assert list(match_anywhere(['中', '国'], haystack)) == [self.entry4]
Пример #6
0
 def test_consecutive(self, haystack):
     assert list(match_anywhere(['foo', 'bar'], haystack)) \
         == [self.entry1, self.entry2]
     assert list(match_anywhere(['bar', 'foo'], haystack)) == []
Пример #7
0
 def test_single_needle(self, haystack):
     assert list(match_anywhere(['bar'],
                                haystack)) == [self.entry1, self.entry2]
Пример #8
0
 def test_wildcard_in_needle(self, haystack):
     # https://github.com/wting/autojump/issues/402
     assert list(match_anywhere(['*', 'this'], haystack)) == []
     assert list(match_anywhere(['this', '*'], haystack)) == [self.entry5]
Пример #9
0
 def test_ignore_case(self, haystack):
     assert list(match_anywhere(['bAz', 'bAR'], haystack, ignore_case=True)) \
         == [self.entry2]
Пример #10
0
 def test_skip(self, haystack):
     assert list(match_anywhere(['baz', 'bar'], haystack)) == [self.entry2]
     assert list(match_anywhere(['中', '国'], haystack)) == [self.entry4]
Пример #11
0
 def test_consecutive(self, haystack):
     assert list(match_anywhere(['foo', 'bar'], haystack)) \
         == [self.entry1, self.entry2]
     assert list(match_anywhere(['bar', 'foo'], haystack)) == []
Пример #12
0
 def test_single_needle(self, haystack):
     assert list(match_anywhere(['bar'], haystack)) == [self.entry1, self.entry2]