-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update install-dotnet and add csc tests
- Loading branch information
Zachary Eisinger
committed
Jun 12, 2020
1 parent
6efb2bd
commit 232f64b
Showing
2 changed files
with
902 additions
and
686 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| import fs = require('fs'); | ||
|
|
||
| describe('csc tests', () => { | ||
| it('Valid regular expression', async () => { | ||
| var cscFile = require('../.github/csc.json'); | ||
| var regex = cscFile['problemMatcher'][0]['pattern'][0]['regexp']; | ||
|
|
||
| console.log(regex); | ||
| var re = new RegExp(regex); | ||
|
|
||
| // Ideally we would verify that this | ||
| var stringsToMatch = [ | ||
| 'Program.cs(10,79): error CS1002: ; expected [/Users/zacharyeisinger/Documents/repo/setup-dotnet/__tests__/sample-broken-csproj/sample.csproj]', | ||
| "S:\\Msbuild\\src\\Build\\Evaluation\\ExpressionShredder.cs(33,7): error CS1003: Syntax error, ',' expected [S:\\msbuild\\src\\Build\\Microsoft.Build.csproj > Properties:prop]" | ||
| ]; | ||
|
|
||
| stringsToMatch.forEach(string => { | ||
| var matchStr = string.match(re); | ||
| console.log(matchStr); | ||
| expect(matchStr).toEqual(expect.anything()); | ||
| }); | ||
| }, 10000); | ||
| }); |
Oops, something went wrong.