File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -33,6 +33,8 @@ bool IBuildActions.FileExists(string file)
3333 FileExistsIn . Add ( file ) ;
3434 if ( FileExists . TryGetValue ( file , out var ret ) )
3535 return ret ;
36+ if ( FileExists . TryGetValue ( System . IO . Path . GetFileName ( file ) , out ret ) )
37+ return ret ;
3638 throw new ArgumentException ( "Missing FileExists " + file ) ;
3739 }
3840
Original file line number Diff line number Diff line change 11using Xunit ;
22using Semmle . Util . Logging ;
33using System ;
4+ using System . IO ;
5+ using Semmle . Util ;
46
57namespace Semmle . Extraction . Tests
68{
@@ -184,5 +186,24 @@ public void Fast()
184186 options = CSharp . Options . CreateWithEnvironment ( new string [ ] { } ) ;
185187 Assert . True ( options . Fast ) ;
186188 }
189+
190+ [ Fact ]
191+ public void ArchiveArguments ( )
192+ {
193+ var file1 = Path . GetTempFileName ( ) ;
194+ var file2 = Path . GetTempFileName ( ) ;
195+
196+ try
197+ {
198+ File . AppendAllText ( file1 , "Test" ) ;
199+ new string [ ] { "/noconfig" , "@" + file1 } . ArchiveCommandLine ( file2 ) ;
200+ Assert . Equal ( "Test" , File . ReadAllText ( file2 ) ) ;
201+ }
202+ finally
203+ {
204+ File . Delete ( file1 ) ;
205+ File . Delete ( file2 ) ;
206+ }
207+ }
187208 }
188209}
You can’t perform that action at this time.
0 commit comments