diff options
author | Michael Trier <mtrier@gmail.com> | 2008-05-07 16:49:48 -0400 |
---|---|---|
committer | Michael Trier <mtrier@gmail.com> | 2008-05-07 16:49:48 -0400 |
commit | 33ebe7acec14b25c5f84f35a664803fcab2f7781 (patch) | |
tree | 960b40fe368a9882221bcdd8635b9080dec01ec6 /test/git/test_utils.py | |
download | gitpython-33ebe7acec14b25c5f84f35a664803fcab2f7781.tar.gz |
initial project
Diffstat (limited to 'test/git/test_utils.py')
-rw-r--r-- | test/git/test_utils.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/git/test_utils.py b/test/git/test_utils.py new file mode 100644 index 00000000..2147e4cb --- /dev/null +++ b/test/git/test_utils.py @@ -0,0 +1,17 @@ +import os +from gitalicious.test.asserts import * +from gitalicious.lib import * +from gitalicious.test.helper import * + +class TestUtils(object): + def setup(self): + base = os.path.join(os.path.dirname(__file__), "../.."), + self.git = Git(base) + self.git_bin_base = "%s --git-dir='%s'" % (Git.git_binary, base) + + def test_it_escapes_single_quotes_with_shell_escape(self): + assert_equal("\\\\'foo", shell_escape("'foo")) + + def test_it_should_dashify(self): + assert_equal('this-is-my-argument', dashify('this_is_my_argument')) + assert_equal('foo', dashify('foo')) |