Add more wildcard examples

This commit is contained in:
Simon Engledew 2020-12-01 15:33:27 +00:00
parent 14719432ef
commit 145a3c1ed9
No known key found for this signature in database
GPG key ID: 84302E7B02FE8BCE
3 changed files with 31 additions and 4 deletions

View file

@ -216,5 +216,14 @@ ava_1.default("formatWorkflowCause()", (t) => {
ava_1.default("patternsOverlap()", (t) => {
t.false(actionsutil.patternsOverlap("main-*", "main"));
t.true(actionsutil.patternsOverlap("*", "*"));
t.true(actionsutil.patternsOverlap("*", "main-*"));
t.false(actionsutil.patternsOverlap("main-*", "*"));
t.false(actionsutil.patternsOverlap("main-*", "main"));
t.true(actionsutil.patternsOverlap("main", "main"));
t.false(actionsutil.patternsOverlap("*", "feature/*"));
t.true(actionsutil.patternsOverlap("**", "feature/*"));
t.false(actionsutil.patternsOverlap("feature-*", "**"));
t.true(actionsutil.patternsOverlap("/robin/*/release/*", "/robin/moose/release/goose"));
t.false(actionsutil.patternsOverlap("/robin/moose/release/goose", "/robin/*/release/*"));
});
//# sourceMappingURL=actions-util.test.js.map

File diff suppressed because one or more lines are too long