@@ -22,7 +22,7 @@ public void DefaultOptions()
2222 {
2323 options = CSharp . Options . CreateWithEnvironment ( Array . Empty < string > ( ) ) ;
2424 Assert . True ( options . Cache ) ;
25- Assert . False ( options . CIL ) ;
25+ Assert . True ( options . CIL ) ;
2626 Assert . Null ( options . Framework ) ;
2727 Assert . Null ( options . CompilerName ) ;
2828 Assert . Empty ( options . CompilerArguments ) ;
@@ -51,10 +51,20 @@ public void Cache()
5151 [ Fact ]
5252 public void CIL ( )
5353 {
54- options = CSharp . Options . CreateWithEnvironment ( new string [ ] { "--cil" } ) ;
54+ options = CSharp . Options . CreateWithEnvironment ( Array . Empty < string > ( ) ) ;
5555 Assert . True ( options . CIL ) ;
56- options = CSharp . Options . CreateWithEnvironment ( new string [ ] { "--cil" , "--nocil" } ) ;
56+
57+ Environment . SetEnvironmentVariable ( "CODEQL_EXTRACTOR_CSHARP_OPTION_CIL" , "false" ) ;
58+ options = CSharp . Options . CreateWithEnvironment ( Array . Empty < string > ( ) ) ;
5759 Assert . False ( options . CIL ) ;
60+
61+ Environment . SetEnvironmentVariable ( "CODEQL_EXTRACTOR_CSHARP_OPTION_CIL" , "true" ) ;
62+ options = CSharp . Options . CreateWithEnvironment ( Array . Empty < string > ( ) ) ;
63+ Assert . True ( options . CIL ) ;
64+
65+ Environment . SetEnvironmentVariable ( "CODEQL_EXTRACTOR_CSHARP_OPTION_CIL" , null ) ;
66+ options = CSharp . Options . CreateWithEnvironment ( Array . Empty < string > ( ) ) ;
67+ Assert . True ( options . CIL ) ;
5868 }
5969
6070 [ Fact ]
@@ -121,22 +131,6 @@ public void Framework()
121131 Assert . Equal ( "foo" , options . Framework ) ;
122132 }
123133
124- [ Fact ]
125- public void EnvironmentVariables ( )
126- {
127- Environment . SetEnvironmentVariable ( "LGTM_INDEX_EXTRACTOR" , "--cil c" ) ;
128- options = CSharp . Options . CreateWithEnvironment ( new string [ ] { "a" , "b" } ) ;
129- Assert . True ( options . CIL ) ;
130- Assert . Equal ( "a" , options . CompilerArguments [ 0 ] ) ;
131- Assert . Equal ( "b" , options . CompilerArguments [ 1 ] ) ;
132- Assert . Equal ( "c" , options . CompilerArguments [ 2 ] ) ;
133-
134- Environment . SetEnvironmentVariable ( "LGTM_INDEX_EXTRACTOR" , "" ) ;
135- Environment . SetEnvironmentVariable ( "LGTM_INDEX_EXTRACTOR" , "--nocil" ) ;
136- options = CSharp . Options . CreateWithEnvironment ( new string [ ] { "--cil" } ) ;
137- Assert . False ( options . CIL ) ;
138- }
139-
140134 [ Fact ]
141135 public void StandaloneDefaults ( )
142136 {
0 commit comments