1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-30 03:23:08 +03:00

Improve staging panel integration tests

This commit is contained in:
Jesse Duffield
2023-02-24 21:42:27 +11:00
parent 752526c880
commit db011d8e34
18 changed files with 417 additions and 116 deletions

View File

@ -61,6 +61,11 @@ func (self *matcher) Contains(target string) *matcher {
return self.appendRule(matcherRule{
name: fmt.Sprintf("contains '%s'", target),
testFn: func(value string) (bool, string) {
// everything contains the empty string so we unconditionally return true here
if target == "" {
return true, ""
}
return strings.Contains(value, target), fmt.Sprintf("Expected '%s' to be found in '%s'", target, value)
},
})