This commit is contained in:
TDPUser 2016-05-24 13:27:33 -07:00
Родитель 950e1fa2ad
Коммит aafc2b19de
2 изменённых файлов: 4 добавлений и 2 удалений

Двоичные данные
.Program.cs.swp Normal file

Двоичный файл не отображается.

Просмотреть файл

@ -67,13 +67,15 @@ namespace Microsoft.Edge.A11y
//If this is the first time, write the header line with the test names
if (!File.Exists(filePath))
{
var headerLine = "score," + results.Select(r => r.Name).Aggregate((s1, s2) => s1 + "," + s2) + "\n";
var headerLine = "score," + results.Select(r => r.Name + "," + r.Name + "details").Aggregate((s1, s2) => s1 + "," + s2) + "\n";
File.WriteAllText(filePath, headerLine);
}
//Write the results
var writer = File.AppendText(filePath);
var resultline = score + "," + results.Select(r => r.Result.ToString()).Aggregate((s1, s2) => s1 + "," + s2);
var resultline = score + "," + results
.Select(r => (r.Result.ToString() + ",") + (r.MoreInfo != null ? r.MoreInfo.Replace('\n', '\t') : ""))
.Aggregate((s1, s2) => s1 + "," + s2);
writer.WriteLine(resultline);
writer.Flush();