1 write to WorkingDirectory
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (1)
CommandLineTestBase.cs (1)
30WorkingDirectory = TempRoot.Root;
270 references to WorkingDirectory
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (270)
CommandLineTestBase.cs (1)
57return CreateCSharpCompiler(null, WorkingDirectory, args, analyzers, generators, loader, driverCache, additionalReferences);
CommandLineTests.cs (257)
454var cmd = CreateCSharpCompiler(rsp, WorkingDirectory, new[] { "b.cs" }); 461AssertEx.Equal(new[] { Path.Combine(WorkingDirectory, "a.cs"), Path.Combine(WorkingDirectory, "b.cs") }, cmd.Arguments.SourceFiles.Select(file => file.Path)); 732var args = DefaultParse(new[] { @"e:c:\test\test.cs", "/t:library" }, WorkingDirectory); 753var parsedArgs = DefaultParse(args, WorkingDirectory); 766parsedArgs = DefaultParse(args, WorkingDirectory); 778parsedArgs = DefaultParse(args, WorkingDirectory); 789parsedArgs = DefaultParse(args, WorkingDirectory); 800parsedArgs = DefaultParse(args, WorkingDirectory); 811parsedArgs = DefaultParse(args, WorkingDirectory); 821var parsedArgs = DefaultParse(new[] { "/win32res:goo", "/win32icon:goob", "a.cs" }, WorkingDirectory); 825parsedArgs = DefaultParse(new[] { "/win32res:goo", "/win32manifest:goob", "a.cs" }, WorkingDirectory); 829parsedArgs = DefaultParse(new[] { "/win32res:", "a.cs" }, WorkingDirectory); 834parsedArgs = DefaultParse(new[] { "/win32Icon: ", "a.cs" }, WorkingDirectory); 839parsedArgs = DefaultParse(new[] { "/win32Manifest:", "a.cs" }, WorkingDirectory); 844parsedArgs = DefaultParse(new[] { "/win32Manifest:goo", "/noWin32Manifest", "a.cs" }, WorkingDirectory); 853var parsedArgs = DefaultParse(new[] { "/win32res", "a.cs" }, WorkingDirectory); 856parsedArgs = DefaultParse(new[] { "/win32res+", "a.cs" }, WorkingDirectory); 859parsedArgs = DefaultParse(new[] { "/win32icon", "a.cs" }, WorkingDirectory); 862parsedArgs = DefaultParse(new[] { "/win32icon+", "a.cs" }, WorkingDirectory); 865parsedArgs = DefaultParse(new[] { "/win32manifest", "a.cs" }, WorkingDirectory); 868parsedArgs = DefaultParse(new[] { "/win32manifest+", "a.cs" }, WorkingDirectory); 877var parsedArgs = DefaultParse(new[] { "/win32icon:" + tmpFileName, "a.cs" }, WorkingDirectory); 919ResourceDescription desc = CSharpCommandLineParser.ParseResourceDescription("", @"\somepath\someFile.goo.bar", WorkingDirectory, diags, embedded: false); 924desc = CSharpCommandLineParser.ParseResourceDescription("", @"\somepath\someFile.goo.bar,someName", WorkingDirectory, diags, embedded: false); 929desc = CSharpCommandLineParser.ParseResourceDescription("", @"\somepath\s""ome Fil""e.goo.bar,someName", WorkingDirectory, diags, embedded: false); 934desc = CSharpCommandLineParser.ParseResourceDescription("", @"\somepath\someFile.goo.bar,""some Name"",public", WorkingDirectory, diags, embedded: false); 941desc = CSharpCommandLineParser.ParseResourceDescription("", @"\somepath\someFile.goo.bar,,private", WorkingDirectory, diags, embedded: false); 948desc = CSharpCommandLineParser.ParseResourceDescription("", @"\somepath\someFile.goo.bar,,""private""", WorkingDirectory, diags, embedded: false); 955desc = CSharpCommandLineParser.ParseResourceDescription("", @",,\somepath\someFile.goo.bar,,private", WorkingDirectory, diags, embedded: false); 963desc = CSharpCommandLineParser.ParseResourceDescription("", @", ,\somepath\someFile.goo.bar,,private", WorkingDirectory, diags, embedded: false); 971desc = CSharpCommandLineParser.ParseResourceDescription("", @"\somepath\someFile.goo.bar,,private", WorkingDirectory, diags, embedded: false); 979desc = CSharpCommandLineParser.ParseResourceDescription("", @"\somepath\someFile.goo.bar,,private, ,", WorkingDirectory, diags, embedded: false); 986desc = CSharpCommandLineParser.ParseResourceDescription("", @"\somepath\someFile.goo.bar,someName,publi", WorkingDirectory, diags, embedded: false); 991desc = CSharpCommandLineParser.ParseResourceDescription("", @"D:rive\relative\path,someName,public", WorkingDirectory, diags, embedded: false); 996desc = CSharpCommandLineParser.ParseResourceDescription("", @"inva\l*d?path,someName,public", WorkingDirectory, diags, embedded: false); 1001desc = CSharpCommandLineParser.ParseResourceDescription("", (string)null, WorkingDirectory, diags, embedded: false); 1006desc = CSharpCommandLineParser.ParseResourceDescription("", "", WorkingDirectory, diags, embedded: false); 1011desc = CSharpCommandLineParser.ParseResourceDescription("", " ", WorkingDirectory, diags, embedded: false); 1018desc = CSharpCommandLineParser.ParseResourceDescription("", " , ", WorkingDirectory, diags, embedded: false); 1025desc = CSharpCommandLineParser.ParseResourceDescription("", "path, ", WorkingDirectory, diags, embedded: false); 1032desc = CSharpCommandLineParser.ParseResourceDescription("", " ,name", WorkingDirectory, diags, embedded: false); 1039desc = CSharpCommandLineParser.ParseResourceDescription("", " , , ", WorkingDirectory, diags, embedded: false); 1046desc = CSharpCommandLineParser.ParseResourceDescription("", "path, , ", WorkingDirectory, diags, embedded: false); 1053desc = CSharpCommandLineParser.ParseResourceDescription("", " ,name, ", WorkingDirectory, diags, embedded: false); 1060desc = CSharpCommandLineParser.ParseResourceDescription("", " , ,private", WorkingDirectory, diags, embedded: false); 1067desc = CSharpCommandLineParser.ParseResourceDescription("", "path,name,", WorkingDirectory, diags, embedded: false); 1075desc = CSharpCommandLineParser.ParseResourceDescription("", "path,name,,", WorkingDirectory, diags, embedded: false); 1083desc = CSharpCommandLineParser.ParseResourceDescription("", "path,name, ", WorkingDirectory, diags, embedded: false); 1090desc = CSharpCommandLineParser.ParseResourceDescription("", "path, ,private", WorkingDirectory, diags, embedded: false); 1097desc = CSharpCommandLineParser.ParseResourceDescription("", " ,name,private", WorkingDirectory, diags, embedded: false); 1106desc = CSharpCommandLineParser.ParseResourceDescription("", String.Format("path,{0},private", longE), WorkingDirectory, diags, embedded: false); 1115desc = CSharpCommandLineParser.ParseResourceDescription("", String.Format("{0},e,private", longI), WorkingDirectory, diags, embedded: false); 1127parsedArgs = DefaultParse(new[] { "/resource:a", "a.cs" }, WorkingDirectory); 1134parsedArgs = DefaultParse(new[] { "/res:b", "a.cs" }, WorkingDirectory); 1141parsedArgs = DefaultParse(new[] { "/linkresource:c", "a.cs" }, WorkingDirectory); 1148parsedArgs = DefaultParse(new[] { "/linkres:d", "a.cs" }, WorkingDirectory); 1159var parsedArgs = DefaultParse(new[] { "/resource:", "a.cs" }, WorkingDirectory); 1162parsedArgs = DefaultParse(new[] { "/resource: ", "a.cs" }, WorkingDirectory); 1165parsedArgs = DefaultParse(new[] { "/res", "a.cs" }, WorkingDirectory); 1168parsedArgs = DefaultParse(new[] { "/RES+", "a.cs" }, WorkingDirectory); 1171parsedArgs = DefaultParse(new[] { "/res-:", "a.cs" }, WorkingDirectory); 1174parsedArgs = DefaultParse(new[] { "/linkresource:", "a.cs" }, WorkingDirectory); 1177parsedArgs = DefaultParse(new[] { "/linkresource: ", "a.cs" }, WorkingDirectory); 1180parsedArgs = DefaultParse(new[] { "/linkres", "a.cs" }, WorkingDirectory); 1183parsedArgs = DefaultParse(new[] { "/linkRES+", "a.cs" }, WorkingDirectory); 1186parsedArgs = DefaultParse(new[] { "/linkres-:", "a.cs" }, WorkingDirectory); 1193var parsedArgs = DefaultParse(new[] { "/link:a", "/link:b,,,,c", "a.cs" }, WorkingDirectory); 1200parsedArgs = DefaultParse(new[] { "/Link: ,,, b ,,", "a.cs" }, WorkingDirectory); 1207parsedArgs = DefaultParse(new[] { "/l:", "a.cs" }, WorkingDirectory); 1210parsedArgs = DefaultParse(new[] { "/L", "a.cs" }, WorkingDirectory); 1213parsedArgs = DefaultParse(new[] { "/l+", "a.cs" }, WorkingDirectory); 1216parsedArgs = DefaultParse(new[] { "/link-:", "a.cs" }, WorkingDirectory); 1236var parsedArgs = DefaultParse(new[] { "/recurse:" + dir.ToString() + "\\*.cs" }, WorkingDirectory); 1246parsedArgs = DefaultParse(new[] { "/reCURSE:", "a.cs" }, WorkingDirectory); 1249parsedArgs = DefaultParse(new[] { "/RECURSE: ", "a.cs" }, WorkingDirectory); 1252parsedArgs = DefaultParse(new[] { "/recurse", "a.cs" }, WorkingDirectory); 1255parsedArgs = DefaultParse(new[] { "/recurse+", "a.cs" }, WorkingDirectory); 1258parsedArgs = DefaultParse(new[] { "/recurse-:", "a.cs" }, WorkingDirectory); 1271var parsedArgs = DefaultParse(new[] { "/nostdlib", "/r:a", "/REFERENCE:b,,,,c", "a.cs" }, WorkingDirectory); 1278parsedArgs = DefaultParse(new[] { "/Reference: ,,, b ,,", "/nostdlib", "a.cs" }, WorkingDirectory); 1285parsedArgs = DefaultParse(new[] { "/Reference:a=b,,,", "/nostdlib", "a.cs" }, WorkingDirectory); 1290parsedArgs = DefaultParse(new[] { "/r:a=b,,,c", "a.cs" }, WorkingDirectory); 1293parsedArgs = DefaultParse(new[] { "/r:1=b", "a.cs" }, WorkingDirectory); 1296parsedArgs = DefaultParse(new[] { "/r:", "a.cs" }, WorkingDirectory); 1299parsedArgs = DefaultParse(new[] { "/R", "a.cs" }, WorkingDirectory); 1302parsedArgs = DefaultParse(new[] { "/reference+", "a.cs" }, WorkingDirectory); 1305parsedArgs = DefaultParse(new[] { "/reference-:", "a.cs" }, WorkingDirectory); 1312var parsedArgs = DefaultParse(new[] { "/target:exe", "a.cs" }, WorkingDirectory); 1316parsedArgs = DefaultParse(new[] { "/t:module", "a.cs" }, WorkingDirectory); 1320parsedArgs = DefaultParse(new[] { "/target:library", "a.cs" }, WorkingDirectory); 1324parsedArgs = DefaultParse(new[] { "/TARGET:winexe", "a.cs" }, WorkingDirectory); 1328parsedArgs = DefaultParse(new[] { "/target:appcontainerexe", "a.cs" }, WorkingDirectory); 1332parsedArgs = DefaultParse(new[] { "/target:winmdobj", "a.cs" }, WorkingDirectory); 1336parsedArgs = DefaultParse(new[] { "/target:winexe", "/T:exe", "/target:module", "a.cs" }, WorkingDirectory); 1340parsedArgs = DefaultParse(new[] { "/t", "a.cs" }, WorkingDirectory); 1343parsedArgs = DefaultParse(new[] { "/target:", "a.cs" }, WorkingDirectory); 1346parsedArgs = DefaultParse(new[] { "/target:xyz", "a.cs" }, WorkingDirectory); 1349parsedArgs = DefaultParse(new[] { "/T+", "a.cs" }, WorkingDirectory); 1352parsedArgs = DefaultParse(new[] { "/TARGET-:", "a.cs" }, WorkingDirectory); 1359var parsedArgs = DefaultParse(new[] { "/target:exe" }, WorkingDirectory); 1367parsedArgs = DefaultParse(new[] { "/t:module" }, WorkingDirectory); 1375parsedArgs = DefaultParse(new[] { "/target:library" }, WorkingDirectory); 1383parsedArgs = DefaultParse(new[] { "/TARGET:winexe" }, WorkingDirectory); 1391parsedArgs = DefaultParse(new[] { "/target:appcontainerexe" }, WorkingDirectory); 1399parsedArgs = DefaultParse(new[] { "/target:winmdobj" }, WorkingDirectory); 1407parsedArgs = DefaultParse(new[] { "/target:winexe", "/T:exe", "/target:module" }, WorkingDirectory); 1415parsedArgs = DefaultParse(new[] { "/t" }, WorkingDirectory); 1424parsedArgs = DefaultParse(new[] { "/target:" }, WorkingDirectory); 1433parsedArgs = DefaultParse(new[] { "/target:xyz" }, WorkingDirectory); 1442parsedArgs = DefaultParse(new[] { "/T+" }, WorkingDirectory); 1451parsedArgs = DefaultParse(new[] { "/TARGET-:" }, WorkingDirectory); 1464CSharpCommandLineArguments args = DefaultParse(new[] { "/win32manifest:blah", "/target:module", "a.cs" }, WorkingDirectory); 1479var parsedArgs = CSharpCommandLineParser.Script.Parse(new[] { "a + b" }, WorkingDirectory, sdkDirectory); 1484parsedArgs = CSharpCommandLineParser.Script.Parse(new[] { "a + b; c" }, WorkingDirectory, sdkDirectory); 1489parsedArgs = CSharpCommandLineParser.Script.Parse(new[] { "/help" }, WorkingDirectory, sdkDirectory); 1494parsedArgs = CSharpCommandLineParser.Script.Parse(new[] { "/version" }, WorkingDirectory, sdkDirectory); 1499parsedArgs = CSharpCommandLineParser.Script.Parse(new[] { "/langversion:?" }, WorkingDirectory, sdkDirectory); 1504parsedArgs = CSharpCommandLineParser.Script.Parse(new[] { "//langversion:?" }, WorkingDirectory, sdkDirectory); 1510parsedArgs = CSharpCommandLineParser.Script.Parse(new[] { "/version", "c.csx" }, WorkingDirectory, sdkDirectory); 1515parsedArgs = CSharpCommandLineParser.Script.Parse(new[] { "/version:something" }, WorkingDirectory, sdkDirectory); 1520parsedArgs = CSharpCommandLineParser.Script.Parse(new[] { "/?" }, WorkingDirectory, sdkDirectory); 1525parsedArgs = CSharpCommandLineParser.Script.Parse(new[] { "c.csx /langversion:6" }, WorkingDirectory, sdkDirectory); 1530parsedArgs = CSharpCommandLineParser.Script.Parse(new[] { "/langversion:-1", "c.csx", }, WorkingDirectory, sdkDirectory); 1538parsedArgs = CSharpCommandLineParser.Script.Parse(new[] { "c.csx /r:s=d /r:d.dll" }, WorkingDirectory, sdkDirectory); 1543parsedArgs = CSharpCommandLineParser.Script.Parse(new[] { "@roslyn_test_non_existing_file" }, WorkingDirectory, sdkDirectory); 1546Diagnostic(ErrorCode.ERR_OpenResponseFile).WithArguments(Path.Combine(WorkingDirectory, @"roslyn_test_non_existing_file"))); 1551parsedArgs = CSharpCommandLineParser.Script.Parse(new[] { "c /define:DEBUG" }, WorkingDirectory, sdkDirectory); 1556parsedArgs = CSharpCommandLineParser.Script.Parse(new[] { "\\" }, WorkingDirectory, sdkDirectory); 1561parsedArgs = CSharpCommandLineParser.Script.Parse(new[] { "/r:d.dll", "c.csx" }, WorkingDirectory, sdkDirectory); 1566parsedArgs = CSharpCommandLineParser.Script.Parse(new[] { "/define:goo", "c.csx" }, WorkingDirectory, sdkDirectory); 1573parsedArgs = CSharpCommandLineParser.Script.Parse(new[] { "\"/r d.dll\"" }, WorkingDirectory, sdkDirectory); 1578parsedArgs = CSharpCommandLineParser.Script.Parse(new[] { "/r: d.dll", "a.cs" }, WorkingDirectory, sdkDirectory); 1611var parsedArgs = DefaultParse(new[] { $"/langversion:{value}", "a.cs" }, WorkingDirectory); 1616var scriptParsedArgs = ScriptParse(new[] { $"/langversion:{value}" }, WorkingDirectory); 1633var parsedArgs = DefaultParse(new[] { $"/langversion:{formerValue}", $"/langversion:{latterValue}", "a.cs" }, WorkingDirectory); 1644var parsedArgs = DefaultParse(new[] { "/langversion:default", "a.cs" }, WorkingDirectory); 1657var parsedArgs = DefaultParse(new[] { "/langversion:latest", "a.cs" }, WorkingDirectory); 1667var parsedArgs = DefaultParse(new[] { "a.cs" }, WorkingDirectory); 1681DefaultParse(new[] { $"/langversion:{value}", "a.cs" }, WorkingDirectory).Errors.Verify( 1696DefaultParse(new[] { $"/langversion:{value}", "a.cs" }, WorkingDirectory).Errors.Verify( 1707DefaultParse(new[] { option, "a.cs" }, WorkingDirectory).Errors.Verify( 1715var args = DefaultParse(new[] { "/langversion:?" }, WorkingDirectory); 1901var parsedArgs = DefaultParse(new[] { "a.cs" }, WorkingDirectory); 1905parsedArgs = DefaultParse(new[] { "/d:GOO", "a.cs" }, WorkingDirectory); 1910parsedArgs = DefaultParse(new[] { "/d:GOO;BAR,ZIP", "a.cs" }, WorkingDirectory); 1917parsedArgs = DefaultParse(new[] { "/d:GOO;4X", "a.cs" }, WorkingDirectory); 1954parsedArgs = DefaultParse(new[] { "/d:public1;public2;", "a.cs" }, WorkingDirectory); 1963var parsedArgs = DefaultParse(new[] { "a.cs" }, WorkingDirectory); 1970parsedArgs = DefaultParse(new[] { "/debug-", "a.cs" }, WorkingDirectory); 1977parsedArgs = DefaultParse(new[] { "/debug", "a.cs" }, WorkingDirectory); 1984parsedArgs = DefaultParse(new[] { "/debug+", "a.cs" }, WorkingDirectory); 1991parsedArgs = DefaultParse(new[] { "/debug+", "/debug-", "a.cs" }, WorkingDirectory); 1998parsedArgs = DefaultParse(new[] { "/debug:full", "a.cs" }, WorkingDirectory); 2004parsedArgs = DefaultParse(new[] { "/debug:FULL", "a.cs" }, WorkingDirectory); 2009Assert.Equal(Path.Combine(WorkingDirectory, "a.pdb"), parsedArgs.GetPdbFilePath("a.dll")); 2011parsedArgs = DefaultParse(new[] { "/debug:pdbonly", "a.cs" }, WorkingDirectory); 2017parsedArgs = DefaultParse(new[] { "/debug:portable", "a.cs" }, WorkingDirectory); 2022Assert.Equal(Path.Combine(WorkingDirectory, "a.pdb"), parsedArgs.GetPdbFilePath("a.dll")); 2024parsedArgs = DefaultParse(new[] { "/debug:embedded", "a.cs" }, WorkingDirectory); 2029Assert.Equal(Path.Combine(WorkingDirectory, "a.pdb"), parsedArgs.GetPdbFilePath("a.dll")); 2031parsedArgs = DefaultParse(new[] { "/debug:PDBONLY", "a.cs" }, WorkingDirectory); 2037parsedArgs = DefaultParse(new[] { "/debug:full", "/debug:pdbonly", "a.cs" }, WorkingDirectory); 2043parsedArgs = DefaultParse(new[] { "/debug:pdbonly", "/debug:full", "a.cs" }, WorkingDirectory); 2049parsedArgs = DefaultParse(new[] { "/debug:pdbonly", "/debug-", "a.cs" }, WorkingDirectory); 2055parsedArgs = DefaultParse(new[] { "/debug:pdbonly", "/debug-", "/debug", "a.cs" }, WorkingDirectory); 2061parsedArgs = DefaultParse(new[] { "/debug:pdbonly", "/debug-", "/debug+", "a.cs" }, WorkingDirectory); 2067parsedArgs = DefaultParse(new[] { "/debug:embedded", "/debug-", "/debug+", "a.cs" }, WorkingDirectory); 2073parsedArgs = DefaultParse(new[] { "/debug:embedded", "/debug-", "a.cs" }, WorkingDirectory); 2079parsedArgs = DefaultParse(new[] { "/debug:", "a.cs" }, WorkingDirectory); 2082parsedArgs = DefaultParse(new[] { "/debug:+", "a.cs" }, WorkingDirectory); 2085parsedArgs = DefaultParse(new[] { "/debug:invalid", "a.cs" }, WorkingDirectory); 2088parsedArgs = DefaultParse(new[] { "/debug-:", "a.cs" }, WorkingDirectory); 2095var parsedArgs = DefaultParse(new[] { "/pdb:something", "a.cs" }, WorkingDirectory); 2096Assert.Equal(Path.Combine(WorkingDirectory, "something.pdb"), parsedArgs.PdbPath); 2097Assert.Equal(Path.Combine(WorkingDirectory, "something.pdb"), parsedArgs.GetPdbFilePath("a.dll")); 2100parsedArgs = DefaultParse(new[] { "/pdb:something", "/debug:embedded", "a.cs" }, WorkingDirectory); 2101Assert.Equal(Path.Combine(WorkingDirectory, "something.pdb"), parsedArgs.PdbPath); 2102Assert.Equal(Path.Combine(WorkingDirectory, "something.pdb"), parsedArgs.GetPdbFilePath("a.dll")); 2105parsedArgs = DefaultParse(new[] { "/debug", "a.cs" }, WorkingDirectory); 2109Assert.Equal(Path.Combine(WorkingDirectory, "a.pdb"), parsedArgs.GetPdbFilePath("a.dll")); 2111parsedArgs = DefaultParse(new[] { "/pdb", "/debug", "a.cs" }, WorkingDirectory); 2113Assert.Equal(Path.Combine(WorkingDirectory, "a.pdb"), parsedArgs.GetPdbFilePath("a.dll")); 2115parsedArgs = DefaultParse(new[] { "/pdb:", "/debug", "a.cs" }, WorkingDirectory); 2118parsedArgs = DefaultParse(new[] { "/pdb:something", "/debug", "a.cs" }, WorkingDirectory); 2127parsedArgs = DefaultParse(new[] { @"/pdb:""""", "/debug", "a.cs" }, WorkingDirectory); 2132parsedArgs = DefaultParse(new[] { "/pdb:C:\\", "/debug", "a.cs" }, WorkingDirectory); 2137parsedArgs = DefaultParse(new[] { @"/pdb:C:\MyFolder\MyPdb.pdb", "/debug", "a.cs" }, WorkingDirectory); 2142parsedArgs = DefaultParse(new[] { @"/pdb:c:\MyPdb.pdb", "/debug", "a.cs" }, WorkingDirectory); 2146parsedArgs = DefaultParse(new[] { @"/pdb:\MyFolder\MyPdb.pdb", "/debug", "a.cs" }, WorkingDirectory); 2148Assert.Equal(Path.Combine(Path.GetPathRoot(WorkingDirectory), @"MyFolder\MyPdb.pdb"), parsedArgs.PdbPath); 2151parsedArgs = DefaultParse(new[] { @"/pdb:""C:\My Folder\MyPdb.pdb""", "/debug", "a.cs" }, WorkingDirectory); 2156parsedArgs = DefaultParse(new[] { @"/pdb:MyPdb.pdb", "/debug", "a.cs" }, WorkingDirectory); 2158Assert.Equal(FileUtilities.ResolveRelativePath("MyPdb.pdb", WorkingDirectory), parsedArgs.PdbPath); 2161parsedArgs = DefaultParse(new[] { @"/pdb:..\MyPdb.pdb", "/debug", "a.cs" }, WorkingDirectory); 2166parsedArgs = DefaultParse(new[] { @"/pdb:\\b", "/debug", "a.cs" }, WorkingDirectory); 2172parsedArgs = DefaultParse(new[] { @"/pdb:\\b\OkFileName.pdb", "/debug", "a.cs" }, WorkingDirectory); 2178parsedArgs = DefaultParse(new[] { @"/pdb:\\server\share\MyPdb.pdb", "/debug", "a.cs" }, WorkingDirectory); 2183parsedArgs = DefaultParse(new[] { "/pdb:a.b\0b", "/debug", "a.cs" }, WorkingDirectory); 2188parsedArgs = DefaultParse(new[] { "/pdb:a\uD800b.pdb", "/debug", "a.cs" }, WorkingDirectory); 2194parsedArgs = DefaultParse(new[] { @"/pdb:""a<>.pdb""", "a.vb" }, WorkingDirectory); 2200parsedArgs = DefaultParse(new[] { "/pdb:.x", "/debug", "a.cs" }, WorkingDirectory); 2210var parsedArgs = DefaultParse(new[] { "/sourcelink:sl.json", "/debug:portable", "a.cs" }, WorkingDirectory); 2212Assert.Equal(Path.Combine(WorkingDirectory, "sl.json"), parsedArgs.SourceLink); 2214parsedArgs = DefaultParse(new[] { "/sourcelink:sl.json", "/debug:embedded", "a.cs" }, WorkingDirectory); 2216Assert.Equal(Path.Combine(WorkingDirectory, "sl.json"), parsedArgs.SourceLink); 2218parsedArgs = DefaultParse(new[] { @"/sourcelink:""s l.json""", "/debug:embedded", "a.cs" }, WorkingDirectory); 2220Assert.Equal(Path.Combine(WorkingDirectory, "s l.json"), parsedArgs.SourceLink); 2222parsedArgs = DefaultParse(new[] { "/sourcelink:sl.json", "/debug:full", "a.cs" }, WorkingDirectory); 2225parsedArgs = DefaultParse(new[] { "/sourcelink:sl.json", "/debug:pdbonly", "a.cs" }, WorkingDirectory); 2228parsedArgs = DefaultParse(new[] { "/sourcelink:sl.json", "/debug-", "a.cs" }, WorkingDirectory); 2231parsedArgs = DefaultParse(new[] { "/sourcelink:sl.json", "/debug+", "a.cs" }, WorkingDirectory); 2234parsedArgs = DefaultParse(new[] { "/sourcelink:sl.json", "a.cs" }, WorkingDirectory); 2326var parsedArgs = DefaultParse(new[] { "a.cs " }, WorkingDirectory); 2330parsedArgs = DefaultParse(new[] { "/embed", "/debug:portable", "a.cs", "b.cs", "c.cs" }, WorkingDirectory); 2334new[] { "a.cs", "b.cs", "c.cs" }.Select(f => Path.Combine(WorkingDirectory, f)), 2337parsedArgs = DefaultParse(new[] { "/embed:a.cs", "/embed:b.cs", "/debug:embedded", "a.cs", "b.cs", "c.cs" }, WorkingDirectory); 2340new[] { "a.cs", "b.cs" }.Select(f => Path.Combine(WorkingDirectory, f)), 2343parsedArgs = DefaultParse(new[] { "/embed:a.cs;b.cs", "/debug:portable", "a.cs", "b.cs", "c.cs" }, WorkingDirectory); 2346new[] { "a.cs", "b.cs" }.Select(f => Path.Combine(WorkingDirectory, f)), 2349parsedArgs = DefaultParse(new[] { "/embed:a.cs,b.cs", "/debug:portable", "a.cs", "b.cs", "c.cs" }, WorkingDirectory); 2352new[] { "a.cs", "b.cs" }.Select(f => Path.Combine(WorkingDirectory, f)), 2355parsedArgs = DefaultParse(new[] { @"/embed:""a,b.cs""", "/debug:portable", "a,b.cs", "c.cs" }, WorkingDirectory); 2358new[] { "a,b.cs" }.Select(f => Path.Combine(WorkingDirectory, f)), 2361parsedArgs = DefaultParse(new[] { "/embed:a.txt", "/embed", "/debug:portable", "a.cs", "b.cs", "c.cs" }, WorkingDirectory); 2364new[] { "a.txt", "a.cs", "b.cs", "c.cs" }.Select(f => Path.Combine(WorkingDirectory, f)), 2367parsedArgs = DefaultParse(new[] { "/embed", "a.cs" }, WorkingDirectory); 2370parsedArgs = DefaultParse(new[] { "/embed:a.txt", "a.cs" }, WorkingDirectory); 2373parsedArgs = DefaultParse(new[] { "/embed", "/debug-", "a.cs" }, WorkingDirectory); 2376parsedArgs = DefaultParse(new[] { "/embed:a.txt", "/debug-", "a.cs" }, WorkingDirectory); 2379parsedArgs = DefaultParse(new[] { "/embed", "/debug:full", "a.cs" }, WorkingDirectory); 2382parsedArgs = DefaultParse(new[] { "/embed", "/debug:pdbonly", "a.cs" }, WorkingDirectory); 2385parsedArgs = DefaultParse(new[] { "/embed", "/debug+", "a.cs" }, WorkingDirectory); 2558var parsedArgs = DefaultParse(new[] { "a.cs" }, WorkingDirectory); 2562parsedArgs = DefaultParse(new[] { "/optimize-", "a.cs" }, WorkingDirectory); 2566parsedArgs = DefaultParse(new[] { "/optimize", "a.cs" }, WorkingDirectory); 2570parsedArgs = DefaultParse(new[] { "/optimize+", "a.cs" }, WorkingDirectory); 2574parsedArgs = DefaultParse(new[] { "/optimize+", "/optimize-", "a.cs" }, WorkingDirectory); 2578parsedArgs = DefaultParse(new[] { "/optimize:+", "a.cs" }, WorkingDirectory); 2581parsedArgs = DefaultParse(new[] { "/optimize:", "a.cs" }, WorkingDirectory); 2584parsedArgs = DefaultParse(new[] { "/optimize-:", "a.cs" }, WorkingDirectory); 2587parsedArgs = DefaultParse(new[] { "/o-", "a.cs" }, WorkingDirectory); 2590parsedArgs = DefaultParse(new string[] { "/o", "a.cs" }, WorkingDirectory); 2593parsedArgs = DefaultParse(new string[] { "/o+", "a.cs" }, WorkingDirectory); 2596parsedArgs = DefaultParse(new string[] { "/o+", "/optimize-", "a.cs" }, WorkingDirectory); 2599parsedArgs = DefaultParse(new string[] { "/o:+", "a.cs" }, WorkingDirectory); 2602parsedArgs = DefaultParse(new string[] { "/o:", "a.cs" }, WorkingDirectory); 2605parsedArgs = DefaultParse(new string[] { "/o-:", "a.cs" }, WorkingDirectory); 2612var parsedArgs = DefaultParse(new[] { "a.cs" }, WorkingDirectory); 2616parsedArgs = DefaultParse(new[] { "/deterministic+", "a.cs" }, WorkingDirectory); 2620parsedArgs = DefaultParse(new[] { "/deterministic", "a.cs" }, WorkingDirectory); 2624parsedArgs = DefaultParse(new[] { "/deterministic-", "a.cs" }, WorkingDirectory); 2632var parsedArgs = DefaultParse(new string[] { "/r:goo.dll", "a.cs" }, WorkingDirectory); 2636parsedArgs = DefaultParse(new string[] { "/r:goo.dll;", "a.cs" }, WorkingDirectory); 2646parsedArgs = DefaultParse(new string[] { @"/l:goo.dll", "a.cs" }, WorkingDirectory); 2656parsedArgs = DefaultParse(new string[] { @"/addmodule:goo.dll", "a.cs" }, WorkingDirectory); 2666parsedArgs = DefaultParse(new string[] { @"/r:a=goo.dll", "/l:b=bar.dll", "/addmodule:c=mod.dll", "a.cs" }, WorkingDirectory);
SarifErrorLoggerTests.cs (8)
78var cmd = CreateCSharpCompiler(null, WorkingDirectory, arguments); 112var cmd = CreateCSharpCompiler(null, WorkingDirectory, arguments); 145var cmd = CreateCSharpCompiler(null, WorkingDirectory, arguments, 181var cmd = CreateCSharpCompiler(null, WorkingDirectory, arguments, 216var cmd = CreateCSharpCompiler(null, WorkingDirectory, arguments, 251var cmd = CreateCSharpCompiler(null, WorkingDirectory, arguments, 286var cmd = CreateCSharpCompiler(null, WorkingDirectory, arguments, 319var cmd = CreateCSharpCompiler(null, WorkingDirectory, arguments,
SarifV2ErrorLoggerTests.cs (4)
451var cmd = CreateCSharpCompiler(null, WorkingDirectory, arguments, 533var cmd = CreateCSharpCompiler(null, WorkingDirectory, arguments, 603var cmd = CreateCSharpCompiler(null, WorkingDirectory, arguments, 683var cmd = CreateCSharpCompiler(null, WorkingDirectory, arguments);