From 59e494a066536fcd922e67d6e95c4be68f96d0e6 Mon Sep 17 00:00:00 2001 From: William Ting Date: Tue, 31 Dec 2013 17:41:12 -0600 Subject: [PATCH] add has_uppercase() test --- tests/autojump_utils_test.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/autojump_utils_test.py b/tests/autojump_utils_test.py index 77beabe..ea22d40 100644 --- a/tests/autojump_utils_test.py +++ b/tests/autojump_utils_test.py @@ -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"')