From 3d80b2f671db3e4420bf308b290eddd634d1d437 Mon Sep 17 00:00:00 2001 From: Markus Lehtonen Date: Fri, 8 Mar 2013 11:48:23 +0200 Subject: GitRepository/_cmd_has_feature: more intelligent parsing More intelligent parsing of the git output (man page). Try to parse optional options like '--[no-]standard-notes' of git-show correctly. In this example both 'no-standard-notes' and 'standard-notes' would be available. Signed-off-by: Markus Lehtonen --- tests/test_GitRepository.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests/test_GitRepository.py') diff --git a/tests/test_GitRepository.py b/tests/test_GitRepository.py index 0e833b5..5029630 100644 --- a/tests/test_GitRepository.py +++ b/tests/test_GitRepository.py @@ -803,6 +803,10 @@ def test_cmd_has_feature(): Traceback (most recent call last): ... GitRepositoryError: Invalid git command: foobarcmd + >>> repo._cmd_has_feature("show", "standard-notes") + True + >>> repo._cmd_has_feature("show", "no-standard-notes") + True """ def test_teardown(): -- cgit v1.2.3