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:
parent
52ad001917
commit
5c3307d71b
@ -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
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user