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