mirror of
https://github.com/SAP/jenkins-library.git
synced 2025-01-20 05:19:40 +02:00
Add hasSnippet
This commit is contained in:
parent
52ad001917
commit
5c3307d71b
@ -31,6 +31,11 @@ class CommandLineMatcher extends BaseMatcher {
|
|||||||
return this
|
return this
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CommandLineMatcher hasSnippet(String snippet) {
|
||||||
|
this.args.add(snippet)
|
||||||
|
return this
|
||||||
|
}
|
||||||
|
|
||||||
CommandLineMatcher hasArgument(String arg) {
|
CommandLineMatcher hasArgument(String arg) {
|
||||||
this.args.add(arg)
|
this.args.add(arg)
|
||||||
return this
|
return this
|
||||||
@ -58,7 +63,7 @@ class CommandLineMatcher extends BaseMatcher {
|
|||||||
|
|
||||||
for (String arg : args) {
|
for (String arg : args) {
|
||||||
if (!cmd.matches(/.*[\s]*${arg}[\s]*.*/)) {
|
if (!cmd.matches(/.*[\s]*${arg}[\s]*.*/)) {
|
||||||
hint = "A command line having argument '${arg}'."
|
hint = "A command line having argument/snippet '${arg}'."
|
||||||
matches = false
|
matches = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user