summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Martín Nieto <carlosmn@github.com>2016-08-05 18:24:28 +0200
committerGitHub <noreply@github.com>2016-08-05 18:24:28 +0200
commitc550c9222830cd39b41d08479c797342a7e6915b (patch)
tree8f432d0a53af67c4f195f6d0aadf69954944ddc8
parentcba60b9b0ef90ab2b69e5015627c7daa613dfda3 (diff)
parentf2cab0a6faafbeb80e6d12b8a5a18a0185a5280a (diff)
downloadlibgit2-c550c9222830cd39b41d08479c797342a7e6915b.tar.gz
Merge pull request #3881 from pks-t/pks/fix-clar-suite-prefix-computation
clar: fix parsing of test suite prefixes
-rw-r--r--tests/clar.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/clar.c b/tests/clar.c
index 4bee9f755..905d67db7 100644
--- a/tests/clar.c
+++ b/tests/clar.c
@@ -340,6 +340,12 @@ clar_parse_args(int argc, char **argv)
if (strncmp(argument, _clar_suites[j].name, cmplen) == 0) {
int exact = (arglen >= suitelen);
+ /* Do we have a real suite prefix separated by a
+ * trailing '::' or just a matching substring? */
+ if (arglen > suitelen && (argument[suitelen] != ':'
+ || argument[suitelen + 1] != ':'))
+ continue;
+
++found;
if (!exact)