Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
another test case
  • Loading branch information
Bryan MacFarlane committed Mar 30, 2020
1 parent 5156bc5 commit 0a62a73
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions __tests__/setup-go.test.ts
Expand Up @@ -409,6 +409,16 @@ describe('setup-go', () => {
expect(annotation.message).toBe('undefined: fmt.Printl');
});

it('only matches leading dots on unix path', async () => {
let line = 'x./assert.go:5:2: missing return at end of function';
let annotation = testMatch(line);
expect(annotation).toBeDefined();
expect(annotation.line).toBe(5);
expect(annotation.column).toBe(2);
expect(annotation.file).toBe('./assert.go');
expect(annotation.message).toBe('missing return at end of function');
});

// 1.13.1 => 1.13.1
// 1.13 => 1.13.0
// 1.10beta1 => 1.10.0-beta1, 1.10rc1 => 1.10.0-rc1
Expand Down
2 changes: 1 addition & 1 deletion matchers.json
Expand Up @@ -4,7 +4,7 @@
"owner": "go",
"pattern": [
{
"regexp": "((?:.{0,2}\\/|.{0,2}\\\\)(?:.+\\.go)):(?:(\\d+):(\\d+):)? (.*)",
"regexp": "((?:\\.{0,2}\\/|\\.{0,2}\\\\)(?:.+\\.go)):(?:(\\d+):(\\d+):)? (.*)",
"file": 1,
"line": 2,
"column": 3,
Expand Down

0 comments on commit 0a62a73

Please sign in to comment.