feat: add output matcher

This commit is contained in:
wancat committed 2024-03-06 23:32:23 +08:00
1 parent 9eb08b45f4
commit cb26e1dcb0
2 files changed
+14

No files matched your search

+6
View File
@@ -40,6 +40,12 @@ export class PwdMatcher implements Matcher {
}
}
export class OutputMatcher extends PatternMatcher implements Matcher {
match(command: Partial<Command>): boolean {
return command.output ? this.test(command.output.trim()) : false
}
}
export interface ICondition {
command?: string
output?: string