diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2020-12-09 08:37:22 -0500 |
---|---|---|
committer | Daniel J Walsh <dwalsh@redhat.com> | 2020-12-09 08:37:22 -0500 |
commit | 228df27b5496098f8b06c3296517fd55471c9865 (patch) | |
tree | 4fc292d2b58ac9fd9669c3e40ed194aa6cadd333 /vendor/github.com/onsi/gomega/format | |
parent | 247260081a5cdc4065009bcd1080c987974327e5 (diff) | |
download | podman-228df27b5496098f8b06c3296517fd55471c9865.tar.gz podman-228df27b5496098f8b06c3296517fd55471c9865.tar.bz2 podman-228df27b5496098f8b06c3296517fd55471c9865.zip |
Bump github.com/onsi/gomega from 1.10.3 to 1.10.4
Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.10.3 to 1.10.4.
- [Release notes](https://github.com/onsi/gomega/releases)
- [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md)
- [Commits](https://github.com/onsi/gomega/compare/v1.10.3...v1.10.4)
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'vendor/github.com/onsi/gomega/format')
-rw-r--r-- | vendor/github.com/onsi/gomega/format/format.go | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/vendor/github.com/onsi/gomega/format/format.go b/vendor/github.com/onsi/gomega/format/format.go index fae25adce..e59d7d75b 100644 --- a/vendor/github.com/onsi/gomega/format/format.go +++ b/vendor/github.com/onsi/gomega/format/format.go @@ -105,7 +105,13 @@ func MessageWithDiff(actual, message, expected string) string { tabLength := 4 spaceFromMessageToActual := tabLength + len("<string>: ") - len(message) - padding := strings.Repeat(" ", spaceFromMessageToActual+spacesBeforeFormattedMismatch) + "|" + + paddingCount := spaceFromMessageToActual + spacesBeforeFormattedMismatch + if paddingCount < 0 { + return Message(formattedActual, message, formattedExpected) + } + + padding := strings.Repeat(" ", paddingCount) + "|" return Message(formattedActual, message+padding, formattedExpected) } |