fix: correct stdErr match in isErrBlameNotFoundOrNotEnoughLines (#39309)

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
Abhay Pratap Singh
2026-09-14 14:59:18 +00:00
committed by GitHub
co-authored by wxiaoguang
parent 13033827b1
commit 85cbf477e5
6 changed files with 73 additions and 59 deletions
+2 -1
View File
@@ -11,11 +11,12 @@ import (
func TestIsStderr(t *testing.T) {
cases := []struct {
check StderrWildcard
check StderrCheck
stderr string
}{
{StderrUnknownRevisionOrPath, "fatal: ambiguous argument 'origin': unknown revision or path not in the working tree...."},
{StderrNoMergeBase, "fatal: origin/main..HEAD: no merge base...."},
{StderrFileNoEnoughLines, "fatal: file foo/bar has only 1 line"},
}
for _, tc := range cases {
assert.True(t, IsStderr(&runStdError{stderr: tc.stderr}, tc.check), "stderr: %s", tc.stderr)