public void PreprocessorTest(params string[] argv)
{
var c = new Compiler() { CompilerExe = CompilerPath };
c.SetWorkingDirectory(InitialDir);
c.SetEnvironment(Compiler.GetEnvironmentDictionary());
var supported = c.ProcessArguments(argv);
Assert.IsTrue(supported);
Assert.AreEqual(1, c.CliIncludePaths.Count);
Assert.AreEqual( Path.Combine(InitialDir, "test-sources\\inc with spaces"), c.CliIncludePaths[0]);
Assert.AreEqual( Path.Combine(InitialDir, "test-sources\\hello.c"), c.SingleSourceFile);
using (var sw = new StreamWriter(new MemoryStream()))
{
var rv = c.InvokePreprocessor(sw);
Assert.AreEqual(0, rv);
}
}