@@ -12,7 +12,6 @@ pub struct RegexTest {
1212 pub js : Process ,
1313 pub java : Process ,
1414 pub py : Process ,
15- #[ cfg( target_os = "linux" ) ]
1615 pub dotnet : Process ,
1716 pub rust : Count ,
1817 pub pcre : Count ,
@@ -29,23 +28,18 @@ impl RegexTest {
2928 scope. spawn ( || self . test_js ( "x" ) ) ;
3029 scope. spawn ( || self . test_java ( "x" ) ) ;
3130 scope. spawn ( || self . test_python ( "x" ) ) ;
32-
33- #[ cfg( target_os = "linux" ) ]
3431 scope. spawn ( || self . test_dotnet ( "x" ) ) ;
3532 } ) ;
3633 self . js . reset_count ( ) ;
3734 self . java . reset_count ( ) ;
3835 self . py . reset_count ( ) ;
39-
40- #[ cfg( target_os = "linux" ) ]
4136 self . dotnet . reset_count ( ) ;
4237 }
4338
4439 pub fn kill_processes ( & self ) -> io:: Result < ( ) > {
4540 self . js . kill ( ) ?;
4641 self . py . kill ( ) ?;
4742 self . java . kill ( ) ?;
48- #[ cfg( target_os = "linux" ) ]
4943 self . dotnet . kill ( ) ?;
5044 Ok ( ( ) )
5145 }
@@ -118,27 +112,12 @@ impl RegexTest {
118112 self . java . test ( regex, tests)
119113 }
120114
121- #[ cfg( target_os = "linux" ) ]
122115 pub fn test_dotnet ( & self , regex : impl AsRef < str > ) -> Outcome {
123116 self . test_dotnet_with ( regex, & [ ] as & [ & str ] )
124117 }
125118
126- #[ cfg( target_os = "linux" ) ]
127119 pub fn test_dotnet_with ( & self , regex : impl AsRef < str > , tests : & [ impl AsRef < str > ] ) -> Outcome {
128- self . dotnet . start_with ( "dotnet" , "mono" , & [ "TesterAsync.exe" ] , || {
129- let compiled = concat ! ( env!( "CARGO_MANIFEST_DIR" ) , "/dotnet/TesterAsync.exe" ) ;
130- if !Path :: new ( compiled) . exists ( ) {
131- let result = Command :: new ( "mcs" )
132- . current_dir ( concat ! ( env!( "CARGO_MANIFEST_DIR" ) , "/dotnet" ) )
133- . arg ( "TesterAsync.cs" )
134- . output ( )
135- . expect (
136- "`mcs` executable not found, required for running .NET regex flavor tests" ,
137- ) ;
138- assert ! ( result. status. success( ) , "Could not compile C# file" ) ;
139- }
140- } ) ;
141-
120+ self . dotnet . start ( "dotnet" , "dotnet-script" , & [ "TesterAsync.cs" ] ) ;
142121 self . dotnet . test ( regex, tests)
143122 }
144123}
0 commit comments