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)
453var cmd = CreateCSharpCompiler(rsp, WorkingDirectory, new[] { "b.cs" }); 460AssertEx.Equal(new[] { Path.Combine(WorkingDirectory, "a.cs"), Path.Combine(WorkingDirectory, "b.cs") }, cmd.Arguments.SourceFiles.Select(file => file.Path)); 731var args = DefaultParse(new[] { @"e:c:\test\test.cs", "/t:library" }, WorkingDirectory); 752var parsedArgs = DefaultParse(args, WorkingDirectory); 765parsedArgs = DefaultParse(args, WorkingDirectory); 777parsedArgs = DefaultParse(args, WorkingDirectory); 788parsedArgs = DefaultParse(args, WorkingDirectory); 799parsedArgs = DefaultParse(args, WorkingDirectory); 810parsedArgs = DefaultParse(args, WorkingDirectory); 820var parsedArgs = DefaultParse(new[] { "/win32res:goo", "/win32icon:goob", "a.cs" }, WorkingDirectory); 824parsedArgs = DefaultParse(new[] { "/win32res:goo", "/win32manifest:goob", "a.cs" }, WorkingDirectory); 828parsedArgs = DefaultParse(new[] { "/win32res:", "a.cs" }, WorkingDirectory); 833parsedArgs = DefaultParse(new[] { "/win32Icon: ", "a.cs" }, WorkingDirectory); 838parsedArgs = DefaultParse(new[] { "/win32Manifest:", "a.cs" }, WorkingDirectory); 843parsedArgs = DefaultParse(new[] { "/win32Manifest:goo", "/noWin32Manifest", "a.cs" }, WorkingDirectory); 852var parsedArgs = DefaultParse(new[] { "/win32res", "a.cs" }, WorkingDirectory); 855parsedArgs = DefaultParse(new[] { "/win32res+", "a.cs" }, WorkingDirectory); 858parsedArgs = DefaultParse(new[] { "/win32icon", "a.cs" }, WorkingDirectory); 861parsedArgs = DefaultParse(new[] { "/win32icon+", "a.cs" }, WorkingDirectory); 864parsedArgs = DefaultParse(new[] { "/win32manifest", "a.cs" }, WorkingDirectory); 867parsedArgs = DefaultParse(new[] { "/win32manifest+", "a.cs" }, WorkingDirectory); 876var parsedArgs = DefaultParse(new[] { "/win32icon:" + tmpFileName, "a.cs" }, WorkingDirectory); 918ResourceDescription desc = CSharpCommandLineParser.ParseResourceDescription("", @"\somepath\someFile.goo.bar", WorkingDirectory, diags, embedded: false); 923desc = CSharpCommandLineParser.ParseResourceDescription("", @"\somepath\someFile.goo.bar,someName", WorkingDirectory, diags, embedded: false); 928desc = CSharpCommandLineParser.ParseResourceDescription("", @"\somepath\s""ome Fil""e.goo.bar,someName", WorkingDirectory, diags, embedded: false); 933desc = CSharpCommandLineParser.ParseResourceDescription("", @"\somepath\someFile.goo.bar,""some Name"",public", WorkingDirectory, diags, embedded: false); 940desc = CSharpCommandLineParser.ParseResourceDescription("", @"\somepath\someFile.goo.bar,,private", WorkingDirectory, diags, embedded: false); 947desc = CSharpCommandLineParser.ParseResourceDescription("", @"\somepath\someFile.goo.bar,,""private""", WorkingDirectory, diags, embedded: false); 954desc = CSharpCommandLineParser.ParseResourceDescription("", @",,\somepath\someFile.goo.bar,,private", WorkingDirectory, diags, embedded: false); 962desc = CSharpCommandLineParser.ParseResourceDescription("", @", ,\somepath\someFile.goo.bar,,private", WorkingDirectory, diags, embedded: false); 970desc = CSharpCommandLineParser.ParseResourceDescription("", @"\somepath\someFile.goo.bar,,private", WorkingDirectory, diags, embedded: false); 978desc = CSharpCommandLineParser.ParseResourceDescription("", @"\somepath\someFile.goo.bar,,private, ,", WorkingDirectory, diags, embedded: false); 985desc = CSharpCommandLineParser.ParseResourceDescription("", @"\somepath\someFile.goo.bar,someName,publi", WorkingDirectory, diags, embedded: false); 990desc = CSharpCommandLineParser.ParseResourceDescription("", @"D:rive\relative\path,someName,public", WorkingDirectory, diags, embedded: false); 995desc = CSharpCommandLineParser.ParseResourceDescription("", @"inva\l*d?path,someName,public", WorkingDirectory, diags, embedded: false); 1000desc = CSharpCommandLineParser.ParseResourceDescription("", (string)null, WorkingDirectory, diags, embedded: false); 1005desc = CSharpCommandLineParser.ParseResourceDescription("", "", WorkingDirectory, diags, embedded: false); 1010desc = CSharpCommandLineParser.ParseResourceDescription("", " ", WorkingDirectory, diags, embedded: false); 1017desc = CSharpCommandLineParser.ParseResourceDescription("", " , ", WorkingDirectory, diags, embedded: false); 1024desc = CSharpCommandLineParser.ParseResourceDescription("", "path, ", WorkingDirectory, diags, embedded: false); 1031desc = CSharpCommandLineParser.ParseResourceDescription("", " ,name", WorkingDirectory, diags, embedded: false); 1038desc = CSharpCommandLineParser.ParseResourceDescription("", " , , ", WorkingDirectory, diags, embedded: false); 1045desc = CSharpCommandLineParser.ParseResourceDescription("", "path, , ", WorkingDirectory, diags, embedded: false); 1052desc = CSharpCommandLineParser.ParseResourceDescription("", " ,name, ", WorkingDirectory, diags, embedded: false); 1059desc = CSharpCommandLineParser.ParseResourceDescription("", " , ,private", WorkingDirectory, diags, embedded: false); 1066desc = CSharpCommandLineParser.ParseResourceDescription("", "path,name,", WorkingDirectory, diags, embedded: false); 1074desc = CSharpCommandLineParser.ParseResourceDescription("", "path,name,,", WorkingDirectory, diags, embedded: false); 1082desc = CSharpCommandLineParser.ParseResourceDescription("", "path,name, ", WorkingDirectory, diags, embedded: false); 1089desc = CSharpCommandLineParser.ParseResourceDescription("", "path, ,private", WorkingDirectory, diags, embedded: false); 1096desc = CSharpCommandLineParser.ParseResourceDescription("", " ,name,private", WorkingDirectory, diags, embedded: false); 1105desc = CSharpCommandLineParser.ParseResourceDescription("", String.Format("path,{0},private", longE), WorkingDirectory, diags, embedded: false); 1114desc = CSharpCommandLineParser.ParseResourceDescription("", String.Format("{0},e,private", longI), WorkingDirectory, diags, embedded: false); 1126parsedArgs = DefaultParse(new[] { "/resource:a", "a.cs" }, WorkingDirectory); 1133parsedArgs = DefaultParse(new[] { "/res:b", "a.cs" }, WorkingDirectory); 1140parsedArgs = DefaultParse(new[] { "/linkresource:c", "a.cs" }, WorkingDirectory); 1147parsedArgs = DefaultParse(new[] { "/linkres:d", "a.cs" }, WorkingDirectory); 1158var parsedArgs = DefaultParse(new[] { "/resource:", "a.cs" }, WorkingDirectory); 1161parsedArgs = DefaultParse(new[] { "/resource: ", "a.cs" }, WorkingDirectory); 1164parsedArgs = DefaultParse(new[] { "/res", "a.cs" }, WorkingDirectory); 1167parsedArgs = DefaultParse(new[] { "/RES+", "a.cs" }, WorkingDirectory); 1170parsedArgs = DefaultParse(new[] { "/res-:", "a.cs" }, WorkingDirectory); 1173parsedArgs = DefaultParse(new[] { "/linkresource:", "a.cs" }, WorkingDirectory); 1176parsedArgs = DefaultParse(new[] { "/linkresource: ", "a.cs" }, WorkingDirectory); 1179parsedArgs = DefaultParse(new[] { "/linkres", "a.cs" }, WorkingDirectory); 1182parsedArgs = DefaultParse(new[] { "/linkRES+", "a.cs" }, WorkingDirectory); 1185parsedArgs = DefaultParse(new[] { "/linkres-:", "a.cs" }, WorkingDirectory); 1192var parsedArgs = DefaultParse(new[] { "/link:a", "/link:b,,,,c", "a.cs" }, WorkingDirectory); 1199parsedArgs = DefaultParse(new[] { "/Link: ,,, b ,,", "a.cs" }, WorkingDirectory); 1206parsedArgs = DefaultParse(new[] { "/l:", "a.cs" }, WorkingDirectory); 1209parsedArgs = DefaultParse(new[] { "/L", "a.cs" }, WorkingDirectory); 1212parsedArgs = DefaultParse(new[] { "/l+", "a.cs" }, WorkingDirectory); 1215parsedArgs = DefaultParse(new[] { "/link-:", "a.cs" }, WorkingDirectory); 1235var parsedArgs = DefaultParse(new[] { "/recurse:" + dir.ToString() + "\\*.cs" }, WorkingDirectory); 1245parsedArgs = DefaultParse(new[] { "/reCURSE:", "a.cs" }, WorkingDirectory); 1248parsedArgs = DefaultParse(new[] { "/RECURSE: ", "a.cs" }, WorkingDirectory); 1251parsedArgs = DefaultParse(new[] { "/recurse", "a.cs" }, WorkingDirectory); 1254parsedArgs = DefaultParse(new[] { "/recurse+", "a.cs" }, WorkingDirectory); 1257parsedArgs = DefaultParse(new[] { "/recurse-:", "a.cs" }, WorkingDirectory); 1270var parsedArgs = DefaultParse(new[] { "/nostdlib", "/r:a", "/REFERENCE:b,,,,c", "a.cs" }, WorkingDirectory); 1277parsedArgs = DefaultParse(new[] { "/Reference: ,,, b ,,", "/nostdlib", "a.cs" }, WorkingDirectory); 1284parsedArgs = DefaultParse(new[] { "/Reference:a=b,,,", "/nostdlib", "a.cs" }, WorkingDirectory); 1289parsedArgs = DefaultParse(new[] { "/r:a=b,,,c", "a.cs" }, WorkingDirectory); 1292parsedArgs = DefaultParse(new[] { "/r:1=b", "a.cs" }, WorkingDirectory); 1295parsedArgs = DefaultParse(new[] { "/r:", "a.cs" }, WorkingDirectory); 1298parsedArgs = DefaultParse(new[] { "/R", "a.cs" }, WorkingDirectory); 1301parsedArgs = DefaultParse(new[] { "/reference+", "a.cs" }, WorkingDirectory); 1304parsedArgs = DefaultParse(new[] { "/reference-:", "a.cs" }, WorkingDirectory); 1311var parsedArgs = DefaultParse(new[] { "/target:exe", "a.cs" }, WorkingDirectory); 1315parsedArgs = DefaultParse(new[] { "/t:module", "a.cs" }, WorkingDirectory); 1319parsedArgs = DefaultParse(new[] { "/target:library", "a.cs" }, WorkingDirectory); 1323parsedArgs = DefaultParse(new[] { "/TARGET:winexe", "a.cs" }, WorkingDirectory); 1327parsedArgs = DefaultParse(new[] { "/target:appcontainerexe", "a.cs" }, WorkingDirectory); 1331parsedArgs = DefaultParse(new[] { "/target:winmdobj", "a.cs" }, WorkingDirectory); 1335parsedArgs = DefaultParse(new[] { "/target:winexe", "/T:exe", "/target:module", "a.cs" }, WorkingDirectory); 1339parsedArgs = DefaultParse(new[] { "/t", "a.cs" }, WorkingDirectory); 1342parsedArgs = DefaultParse(new[] { "/target:", "a.cs" }, WorkingDirectory); 1345parsedArgs = DefaultParse(new[] { "/target:xyz", "a.cs" }, WorkingDirectory); 1348parsedArgs = DefaultParse(new[] { "/T+", "a.cs" }, WorkingDirectory); 1351parsedArgs = DefaultParse(new[] { "/TARGET-:", "a.cs" }, WorkingDirectory); 1358var parsedArgs = DefaultParse(new[] { "/target:exe" }, WorkingDirectory); 1366parsedArgs = DefaultParse(new[] { "/t:module" }, WorkingDirectory); 1374parsedArgs = DefaultParse(new[] { "/target:library" }, WorkingDirectory); 1382parsedArgs = DefaultParse(new[] { "/TARGET:winexe" }, WorkingDirectory); 1390parsedArgs = DefaultParse(new[] { "/target:appcontainerexe" }, WorkingDirectory); 1398parsedArgs = DefaultParse(new[] { "/target:winmdobj" }, WorkingDirectory); 1406parsedArgs = DefaultParse(new[] { "/target:winexe", "/T:exe", "/target:module" }, WorkingDirectory); 1414parsedArgs = DefaultParse(new[] { "/t" }, WorkingDirectory); 1423parsedArgs = DefaultParse(new[] { "/target:" }, WorkingDirectory); 1432parsedArgs = DefaultParse(new[] { "/target:xyz" }, WorkingDirectory); 1441parsedArgs = DefaultParse(new[] { "/T+" }, WorkingDirectory); 1450parsedArgs = DefaultParse(new[] { "/TARGET-:" }, WorkingDirectory); 1463CSharpCommandLineArguments args = DefaultParse(new[] { "/win32manifest:blah", "/target:module", "a.cs" }, WorkingDirectory); 1478var parsedArgs = CSharpCommandLineParser.Script.Parse(new[] { "a + b" }, WorkingDirectory, sdkDirectory); 1483parsedArgs = CSharpCommandLineParser.Script.Parse(new[] { "a + b; c" }, WorkingDirectory, sdkDirectory); 1488parsedArgs = CSharpCommandLineParser.Script.Parse(new[] { "/help" }, WorkingDirectory, sdkDirectory); 1493parsedArgs = CSharpCommandLineParser.Script.Parse(new[] { "/version" }, WorkingDirectory, sdkDirectory); 1498parsedArgs = CSharpCommandLineParser.Script.Parse(new[] { "/langversion:?" }, WorkingDirectory, sdkDirectory); 1503parsedArgs = CSharpCommandLineParser.Script.Parse(new[] { "//langversion:?" }, WorkingDirectory, sdkDirectory); 1509parsedArgs = CSharpCommandLineParser.Script.Parse(new[] { "/version", "c.csx" }, WorkingDirectory, sdkDirectory); 1514parsedArgs = CSharpCommandLineParser.Script.Parse(new[] { "/version:something" }, WorkingDirectory, sdkDirectory); 1519parsedArgs = CSharpCommandLineParser.Script.Parse(new[] { "/?" }, WorkingDirectory, sdkDirectory); 1524parsedArgs = CSharpCommandLineParser.Script.Parse(new[] { "c.csx /langversion:6" }, WorkingDirectory, sdkDirectory); 1529parsedArgs = CSharpCommandLineParser.Script.Parse(new[] { "/langversion:-1", "c.csx", }, WorkingDirectory, sdkDirectory); 1537parsedArgs = CSharpCommandLineParser.Script.Parse(new[] { "c.csx /r:s=d /r:d.dll" }, WorkingDirectory, sdkDirectory); 1542parsedArgs = CSharpCommandLineParser.Script.Parse(new[] { "@roslyn_test_non_existing_file" }, WorkingDirectory, sdkDirectory); 1545Diagnostic(ErrorCode.ERR_OpenResponseFile).WithArguments(Path.Combine(WorkingDirectory, @"roslyn_test_non_existing_file"))); 1550parsedArgs = CSharpCommandLineParser.Script.Parse(new[] { "c /define:DEBUG" }, WorkingDirectory, sdkDirectory); 1555parsedArgs = CSharpCommandLineParser.Script.Parse(new[] { "\\" }, WorkingDirectory, sdkDirectory); 1560parsedArgs = CSharpCommandLineParser.Script.Parse(new[] { "/r:d.dll", "c.csx" }, WorkingDirectory, sdkDirectory); 1565parsedArgs = CSharpCommandLineParser.Script.Parse(new[] { "/define:goo", "c.csx" }, WorkingDirectory, sdkDirectory); 1572parsedArgs = CSharpCommandLineParser.Script.Parse(new[] { "\"/r d.dll\"" }, WorkingDirectory, sdkDirectory); 1577parsedArgs = CSharpCommandLineParser.Script.Parse(new[] { "/r: d.dll", "a.cs" }, WorkingDirectory, sdkDirectory); 1610var parsedArgs = DefaultParse(new[] { $"/langversion:{value}", "a.cs" }, WorkingDirectory); 1615var scriptParsedArgs = ScriptParse(new[] { $"/langversion:{value}" }, WorkingDirectory); 1632var parsedArgs = DefaultParse(new[] { $"/langversion:{formerValue}", $"/langversion:{latterValue}", "a.cs" }, WorkingDirectory); 1643var parsedArgs = DefaultParse(new[] { "/langversion:default", "a.cs" }, WorkingDirectory); 1656var parsedArgs = DefaultParse(new[] { "/langversion:latest", "a.cs" }, WorkingDirectory); 1666var parsedArgs = DefaultParse(new[] { "a.cs" }, WorkingDirectory); 1680DefaultParse(new[] { $"/langversion:{value}", "a.cs" }, WorkingDirectory).Errors.Verify( 1695DefaultParse(new[] { $"/langversion:{value}", "a.cs" }, WorkingDirectory).Errors.Verify( 1706DefaultParse(new[] { option, "a.cs" }, WorkingDirectory).Errors.Verify( 1714var args = DefaultParse(new[] { "/langversion:?" }, WorkingDirectory); 1900var parsedArgs = DefaultParse(new[] { "a.cs" }, WorkingDirectory); 1904parsedArgs = DefaultParse(new[] { "/d:GOO", "a.cs" }, WorkingDirectory); 1909parsedArgs = DefaultParse(new[] { "/d:GOO;BAR,ZIP", "a.cs" }, WorkingDirectory); 1916parsedArgs = DefaultParse(new[] { "/d:GOO;4X", "a.cs" }, WorkingDirectory); 1953parsedArgs = DefaultParse(new[] { "/d:public1;public2;", "a.cs" }, WorkingDirectory); 1962var parsedArgs = DefaultParse(new[] { "a.cs" }, WorkingDirectory); 1969parsedArgs = DefaultParse(new[] { "/debug-", "a.cs" }, WorkingDirectory); 1976parsedArgs = DefaultParse(new[] { "/debug", "a.cs" }, WorkingDirectory); 1983parsedArgs = DefaultParse(new[] { "/debug+", "a.cs" }, WorkingDirectory); 1990parsedArgs = DefaultParse(new[] { "/debug+", "/debug-", "a.cs" }, WorkingDirectory); 1997parsedArgs = DefaultParse(new[] { "/debug:full", "a.cs" }, WorkingDirectory); 2003parsedArgs = DefaultParse(new[] { "/debug:FULL", "a.cs" }, WorkingDirectory); 2008Assert.Equal(Path.Combine(WorkingDirectory, "a.pdb"), parsedArgs.GetPdbFilePath("a.dll")); 2010parsedArgs = DefaultParse(new[] { "/debug:pdbonly", "a.cs" }, WorkingDirectory); 2016parsedArgs = DefaultParse(new[] { "/debug:portable", "a.cs" }, WorkingDirectory); 2021Assert.Equal(Path.Combine(WorkingDirectory, "a.pdb"), parsedArgs.GetPdbFilePath("a.dll")); 2023parsedArgs = DefaultParse(new[] { "/debug:embedded", "a.cs" }, WorkingDirectory); 2028Assert.Equal(Path.Combine(WorkingDirectory, "a.pdb"), parsedArgs.GetPdbFilePath("a.dll")); 2030parsedArgs = DefaultParse(new[] { "/debug:PDBONLY", "a.cs" }, WorkingDirectory); 2036parsedArgs = DefaultParse(new[] { "/debug:full", "/debug:pdbonly", "a.cs" }, WorkingDirectory); 2042parsedArgs = DefaultParse(new[] { "/debug:pdbonly", "/debug:full", "a.cs" }, WorkingDirectory); 2048parsedArgs = DefaultParse(new[] { "/debug:pdbonly", "/debug-", "a.cs" }, WorkingDirectory); 2054parsedArgs = DefaultParse(new[] { "/debug:pdbonly", "/debug-", "/debug", "a.cs" }, WorkingDirectory); 2060parsedArgs = DefaultParse(new[] { "/debug:pdbonly", "/debug-", "/debug+", "a.cs" }, WorkingDirectory); 2066parsedArgs = DefaultParse(new[] { "/debug:embedded", "/debug-", "/debug+", "a.cs" }, WorkingDirectory); 2072parsedArgs = DefaultParse(new[] { "/debug:embedded", "/debug-", "a.cs" }, WorkingDirectory); 2078parsedArgs = DefaultParse(new[] { "/debug:", "a.cs" }, WorkingDirectory); 2081parsedArgs = DefaultParse(new[] { "/debug:+", "a.cs" }, WorkingDirectory); 2084parsedArgs = DefaultParse(new[] { "/debug:invalid", "a.cs" }, WorkingDirectory); 2087parsedArgs = DefaultParse(new[] { "/debug-:", "a.cs" }, WorkingDirectory); 2094var parsedArgs = DefaultParse(new[] { "/pdb:something", "a.cs" }, WorkingDirectory); 2095Assert.Equal(Path.Combine(WorkingDirectory, "something.pdb"), parsedArgs.PdbPath); 2096Assert.Equal(Path.Combine(WorkingDirectory, "something.pdb"), parsedArgs.GetPdbFilePath("a.dll")); 2099parsedArgs = DefaultParse(new[] { "/pdb:something", "/debug:embedded", "a.cs" }, WorkingDirectory); 2100Assert.Equal(Path.Combine(WorkingDirectory, "something.pdb"), parsedArgs.PdbPath); 2101Assert.Equal(Path.Combine(WorkingDirectory, "something.pdb"), parsedArgs.GetPdbFilePath("a.dll")); 2104parsedArgs = DefaultParse(new[] { "/debug", "a.cs" }, WorkingDirectory); 2108Assert.Equal(Path.Combine(WorkingDirectory, "a.pdb"), parsedArgs.GetPdbFilePath("a.dll")); 2110parsedArgs = DefaultParse(new[] { "/pdb", "/debug", "a.cs" }, WorkingDirectory); 2112Assert.Equal(Path.Combine(WorkingDirectory, "a.pdb"), parsedArgs.GetPdbFilePath("a.dll")); 2114parsedArgs = DefaultParse(new[] { "/pdb:", "/debug", "a.cs" }, WorkingDirectory); 2117parsedArgs = DefaultParse(new[] { "/pdb:something", "/debug", "a.cs" }, WorkingDirectory); 2126parsedArgs = DefaultParse(new[] { @"/pdb:""""", "/debug", "a.cs" }, WorkingDirectory); 2131parsedArgs = DefaultParse(new[] { "/pdb:C:\\", "/debug", "a.cs" }, WorkingDirectory); 2136parsedArgs = DefaultParse(new[] { @"/pdb:C:\MyFolder\MyPdb.pdb", "/debug", "a.cs" }, WorkingDirectory); 2141parsedArgs = DefaultParse(new[] { @"/pdb:c:\MyPdb.pdb", "/debug", "a.cs" }, WorkingDirectory); 2145parsedArgs = DefaultParse(new[] { @"/pdb:\MyFolder\MyPdb.pdb", "/debug", "a.cs" }, WorkingDirectory); 2147Assert.Equal(Path.Combine(Path.GetPathRoot(WorkingDirectory), @"MyFolder\MyPdb.pdb"), parsedArgs.PdbPath); 2150parsedArgs = DefaultParse(new[] { @"/pdb:""C:\My Folder\MyPdb.pdb""", "/debug", "a.cs" }, WorkingDirectory); 2155parsedArgs = DefaultParse(new[] { @"/pdb:MyPdb.pdb", "/debug", "a.cs" }, WorkingDirectory); 2157Assert.Equal(FileUtilities.ResolveRelativePath("MyPdb.pdb", WorkingDirectory), parsedArgs.PdbPath); 2160parsedArgs = DefaultParse(new[] { @"/pdb:..\MyPdb.pdb", "/debug", "a.cs" }, WorkingDirectory); 2165parsedArgs = DefaultParse(new[] { @"/pdb:\\b", "/debug", "a.cs" }, WorkingDirectory); 2171parsedArgs = DefaultParse(new[] { @"/pdb:\\b\OkFileName.pdb", "/debug", "a.cs" }, WorkingDirectory); 2177parsedArgs = DefaultParse(new[] { @"/pdb:\\server\share\MyPdb.pdb", "/debug", "a.cs" }, WorkingDirectory); 2182parsedArgs = DefaultParse(new[] { "/pdb:a.b\0b", "/debug", "a.cs" }, WorkingDirectory); 2187parsedArgs = DefaultParse(new[] { "/pdb:a\uD800b.pdb", "/debug", "a.cs" }, WorkingDirectory); 2193parsedArgs = DefaultParse(new[] { @"/pdb:""a<>.pdb""", "a.vb" }, WorkingDirectory); 2199parsedArgs = DefaultParse(new[] { "/pdb:.x", "/debug", "a.cs" }, WorkingDirectory); 2209var parsedArgs = DefaultParse(new[] { "/sourcelink:sl.json", "/debug:portable", "a.cs" }, WorkingDirectory); 2211Assert.Equal(Path.Combine(WorkingDirectory, "sl.json"), parsedArgs.SourceLink); 2213parsedArgs = DefaultParse(new[] { "/sourcelink:sl.json", "/debug:embedded", "a.cs" }, WorkingDirectory); 2215Assert.Equal(Path.Combine(WorkingDirectory, "sl.json"), parsedArgs.SourceLink); 2217parsedArgs = DefaultParse(new[] { @"/sourcelink:""s l.json""", "/debug:embedded", "a.cs" }, WorkingDirectory); 2219Assert.Equal(Path.Combine(WorkingDirectory, "s l.json"), parsedArgs.SourceLink); 2221parsedArgs = DefaultParse(new[] { "/sourcelink:sl.json", "/debug:full", "a.cs" }, WorkingDirectory); 2224parsedArgs = DefaultParse(new[] { "/sourcelink:sl.json", "/debug:pdbonly", "a.cs" }, WorkingDirectory); 2227parsedArgs = DefaultParse(new[] { "/sourcelink:sl.json", "/debug-", "a.cs" }, WorkingDirectory); 2230parsedArgs = DefaultParse(new[] { "/sourcelink:sl.json", "/debug+", "a.cs" }, WorkingDirectory); 2233parsedArgs = DefaultParse(new[] { "/sourcelink:sl.json", "a.cs" }, WorkingDirectory); 2325var parsedArgs = DefaultParse(new[] { "a.cs " }, WorkingDirectory); 2329parsedArgs = DefaultParse(new[] { "/embed", "/debug:portable", "a.cs", "b.cs", "c.cs" }, WorkingDirectory); 2333new[] { "a.cs", "b.cs", "c.cs" }.Select(f => Path.Combine(WorkingDirectory, f)), 2336parsedArgs = DefaultParse(new[] { "/embed:a.cs", "/embed:b.cs", "/debug:embedded", "a.cs", "b.cs", "c.cs" }, WorkingDirectory); 2339new[] { "a.cs", "b.cs" }.Select(f => Path.Combine(WorkingDirectory, f)), 2342parsedArgs = DefaultParse(new[] { "/embed:a.cs;b.cs", "/debug:portable", "a.cs", "b.cs", "c.cs" }, WorkingDirectory); 2345new[] { "a.cs", "b.cs" }.Select(f => Path.Combine(WorkingDirectory, f)), 2348parsedArgs = DefaultParse(new[] { "/embed:a.cs,b.cs", "/debug:portable", "a.cs", "b.cs", "c.cs" }, WorkingDirectory); 2351new[] { "a.cs", "b.cs" }.Select(f => Path.Combine(WorkingDirectory, f)), 2354parsedArgs = DefaultParse(new[] { @"/embed:""a,b.cs""", "/debug:portable", "a,b.cs", "c.cs" }, WorkingDirectory); 2357new[] { "a,b.cs" }.Select(f => Path.Combine(WorkingDirectory, f)), 2360parsedArgs = DefaultParse(new[] { "/embed:a.txt", "/embed", "/debug:portable", "a.cs", "b.cs", "c.cs" }, WorkingDirectory); 2363new[] { "a.txt", "a.cs", "b.cs", "c.cs" }.Select(f => Path.Combine(WorkingDirectory, f)), 2366parsedArgs = DefaultParse(new[] { "/embed", "a.cs" }, WorkingDirectory); 2369parsedArgs = DefaultParse(new[] { "/embed:a.txt", "a.cs" }, WorkingDirectory); 2372parsedArgs = DefaultParse(new[] { "/embed", "/debug-", "a.cs" }, WorkingDirectory); 2375parsedArgs = DefaultParse(new[] { "/embed:a.txt", "/debug-", "a.cs" }, WorkingDirectory); 2378parsedArgs = DefaultParse(new[] { "/embed", "/debug:full", "a.cs" }, WorkingDirectory); 2381parsedArgs = DefaultParse(new[] { "/embed", "/debug:pdbonly", "a.cs" }, WorkingDirectory); 2384parsedArgs = DefaultParse(new[] { "/embed", "/debug+", "a.cs" }, WorkingDirectory); 2557var parsedArgs = DefaultParse(new[] { "a.cs" }, WorkingDirectory); 2561parsedArgs = DefaultParse(new[] { "/optimize-", "a.cs" }, WorkingDirectory); 2565parsedArgs = DefaultParse(new[] { "/optimize", "a.cs" }, WorkingDirectory); 2569parsedArgs = DefaultParse(new[] { "/optimize+", "a.cs" }, WorkingDirectory); 2573parsedArgs = DefaultParse(new[] { "/optimize+", "/optimize-", "a.cs" }, WorkingDirectory); 2577parsedArgs = DefaultParse(new[] { "/optimize:+", "a.cs" }, WorkingDirectory); 2580parsedArgs = DefaultParse(new[] { "/optimize:", "a.cs" }, WorkingDirectory); 2583parsedArgs = DefaultParse(new[] { "/optimize-:", "a.cs" }, WorkingDirectory); 2586parsedArgs = DefaultParse(new[] { "/o-", "a.cs" }, WorkingDirectory); 2589parsedArgs = DefaultParse(new string[] { "/o", "a.cs" }, WorkingDirectory); 2592parsedArgs = DefaultParse(new string[] { "/o+", "a.cs" }, WorkingDirectory); 2595parsedArgs = DefaultParse(new string[] { "/o+", "/optimize-", "a.cs" }, WorkingDirectory); 2598parsedArgs = DefaultParse(new string[] { "/o:+", "a.cs" }, WorkingDirectory); 2601parsedArgs = DefaultParse(new string[] { "/o:", "a.cs" }, WorkingDirectory); 2604parsedArgs = DefaultParse(new string[] { "/o-:", "a.cs" }, WorkingDirectory); 2611var parsedArgs = DefaultParse(new[] { "a.cs" }, WorkingDirectory); 2615parsedArgs = DefaultParse(new[] { "/deterministic+", "a.cs" }, WorkingDirectory); 2619parsedArgs = DefaultParse(new[] { "/deterministic", "a.cs" }, WorkingDirectory); 2623parsedArgs = DefaultParse(new[] { "/deterministic-", "a.cs" }, WorkingDirectory); 2631var parsedArgs = DefaultParse(new string[] { "/r:goo.dll", "a.cs" }, WorkingDirectory); 2635parsedArgs = DefaultParse(new string[] { "/r:goo.dll;", "a.cs" }, WorkingDirectory); 2645parsedArgs = DefaultParse(new string[] { @"/l:goo.dll", "a.cs" }, WorkingDirectory); 2655parsedArgs = DefaultParse(new string[] { @"/addmodule:goo.dll", "a.cs" }, WorkingDirectory); 2665parsedArgs = 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);