mirror of
https://github.com/wting/autojump
synced 2024-10-27 20:34:07 +00:00
add has_uppercase() test
This commit is contained in:
parent
cc9b7c28cf
commit
59e494a066
@ -12,6 +12,7 @@ from testify import run
|
||||
import autojump_utils
|
||||
from autojump_utils import decode
|
||||
from autojump_utils import first
|
||||
from autojump_utils import has_uppercase
|
||||
from autojump_utils import in_bash
|
||||
from autojump_utils import last
|
||||
from autojump_utils import sanitize
|
||||
@ -25,6 +26,12 @@ class StringTestCase(TestCase):
|
||||
assert_equal(decode(r'blah'), u'blah')
|
||||
assert_equal(decode(r'日本語'), u'日本語')
|
||||
|
||||
def test_has_uppercase(self):
|
||||
assert_true(has_uppercase('Foo'))
|
||||
assert_true(has_uppercase('foO'))
|
||||
assert_false(has_uppercase('foo'))
|
||||
assert_false(has_uppercase(''))
|
||||
|
||||
@mock.patch.object(autojump_utils, 'in_bash', return_value=True)
|
||||
def test_surround_quotes_in_bash(self, _):
|
||||
assert_equal(surround_quotes('foo'), '"foo"')
|
||||
|
Loading…
Reference in New Issue
Block a user