@@ -22,7 +22,7 @@ public void DefaultOptions()
22
22
{
23
23
options = CSharp . Options . CreateWithEnvironment ( Array . Empty < string > ( ) ) ;
24
24
Assert . True ( options . Cache ) ;
25
- Assert . False ( options . CIL ) ;
25
+ Assert . True ( options . CIL ) ;
26
26
Assert . Null ( options . Framework ) ;
27
27
Assert . Null ( options . CompilerName ) ;
28
28
Assert . Empty ( options . CompilerArguments ) ;
@@ -51,10 +51,20 @@ public void Cache()
51
51
[ Fact ]
52
52
public void CIL ( )
53
53
{
54
- options = CSharp . Options . CreateWithEnvironment ( new string [ ] { "--cil" } ) ;
54
+ options = CSharp . Options . CreateWithEnvironment ( Array . Empty < string > ( ) ) ;
55
55
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 > ( ) ) ;
57
59
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 ) ;
58
68
}
59
69
60
70
[ Fact ]
@@ -121,22 +131,6 @@ public void Framework()
121
131
Assert . Equal ( "foo" , options . Framework ) ;
122
132
}
123
133
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
-
140
134
[ Fact ]
141
135
public void StandaloneDefaults ( )
142
136
{
0 commit comments