File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -9,16 +9,15 @@ namespace Dotnet.Script.Tests
9
9
{
10
10
public class EnvironmentTests
11
11
{
12
- [ Fact ]
13
- public void ShouldPrintVersionNumber ( )
12
+ [ Theory ]
13
+ [ InlineData ( "-v" ) ]
14
+ [ InlineData ( "--version" ) ]
15
+ public void ShouldPrintVersionNumber ( string versionFlag )
14
16
{
15
- var result = ScriptTestRunner . Default . Execute ( "--version" ) ;
16
- Assert . Equal ( 0 , result . exitCode ) ;
17
- Assert . Matches ( @"\d*.\d*.\d*" , result . output ) ;
18
-
19
- result = ScriptTestRunner . Default . Execute ( "-v" ) ;
17
+ var result = ScriptTestRunner . Default . Execute ( versionFlag ) ;
20
18
Assert . Equal ( 0 , result . exitCode ) ;
21
- Assert . Matches ( @"\d*.\d*.\d*" , result . output ) ;
19
+ // TODO test that version appears on first line of output!
20
+ Assert . Matches ( @"^[0-9]+(\.[0-9]+){2}$" , result . output ) ;
22
21
}
23
22
24
23
[ Fact ]
You can’t perform that action at this time.
0 commit comments