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