1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2024-12-12 10:55:20 +02:00

Add hasSnippet

This commit is contained in:
Marcus Holl 2019-06-26 17:05:39 +02:00
parent 52ad001917
commit 5c3307d71b

View File

@ -31,6 +31,11 @@ class CommandLineMatcher extends BaseMatcher {
return this
}
CommandLineMatcher hasSnippet(String snippet) {
this.args.add(snippet)
return this
}
CommandLineMatcher hasArgument(String arg) {
this.args.add(arg)
return this
@ -58,7 +63,7 @@ class CommandLineMatcher extends BaseMatcher {
for (String arg : args) {
if (!cmd.matches(/.*[\s]*${arg}[\s]*.*/)) {
hint = "A command line having argument '${arg}'."
hint = "A command line having argument/snippet '${arg}'."
matches = false
}
}