Skip to content

Commit c550c92

Browse files
authored
Merge pull request libgit2#3881 from pks-t/pks/fix-clar-suite-prefix-computation
clar: fix parsing of test suite prefixes
2 parents cba60b9 + f2cab0a commit c550c92

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/clar.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,12 @@ clar_parse_args(int argc, char **argv)
340340
if (strncmp(argument, _clar_suites[j].name, cmplen) == 0) {
341341
int exact = (arglen >= suitelen);
342342

343+
/* Do we have a real suite prefix separated by a
344+
* trailing '::' or just a matching substring? */
345+
if (arglen > suitelen && (argument[suitelen] != ':'
346+
|| argument[suitelen + 1] != ':'))
347+
continue;
348+
343349
++found;
344350

345351
if (!exact)

0 commit comments

Comments
 (0)