This commit is contained in:
WillAbides 2024-09-01 17:19:24 +01:00 committed by GitHub
commit 86ea382ad0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 11 additions and 1 deletions

View File

@ -645,6 +645,16 @@ describe('setup-go', () => {
expect(annotation.message).toBe('undefined: fmt.Printl'); expect(annotation.message).toBe('undefined: fmt.Printl');
}); });
it('matches test output without a column', async () => {
const line = '/path/to/main_test.go:13: expected true but got false';
const annotation = testMatch(line);
expect(annotation).toBeDefined();
expect(annotation.line).toBe(13);
expect(annotation.column).toBe(NaN);
expect(annotation.file).toBe('/path/to/main_test.go');
expect(annotation.message).toBe('expected true but got false');
});
// 1.13.1 => 1.13.1 // 1.13.1 => 1.13.1
// 1.13 => 1.13.0 // 1.13 => 1.13.0
// 1.10beta1 => 1.10.0-beta.1, 1.10rc1 => 1.10.0-rc.1 // 1.10beta1 => 1.10.0-beta.1, 1.10rc1 => 1.10.0-rc.1

View File

@ -4,7 +4,7 @@
"owner": "go", "owner": "go",
"pattern": [ "pattern": [
{ {
"regexp": "^\\s*(.+\\.go):(?:(\\d+):(\\d+):)? (.*)", "regexp": "^\\s*(.+\\.go):(?:(\\d+):(?:(\\d+):)?)? (.*)",
"file": 1, "file": 1,
"line": 2, "line": 2,
"column": 3, "column": 3,