Use rawWrite for writing test files in unit tests (#168)

This commit is contained in:
Vladiwostok 2024-11-06 16:23:38 +02:00 committed by Albert24GG
parent d9f5b05e66
commit 3f28b37b97
2 changed files with 4 additions and 4 deletions

View File

@ -108,7 +108,7 @@ unittest
sac.allman_braces_check = Check.enabled;
// check common allman style violation
assertAnalyzerWarningsDMD(`
assertAnalyzerWarningsDMD(q{
void testAllman()
{
while (true) { // [warn]: %s
@ -146,7 +146,7 @@ unittest
}
}
}
`c.format(
}c.format(
AllManCheck.MESSAGE,
AllManCheck.MESSAGE,
AllManCheck.MESSAGE,

View File

@ -262,7 +262,7 @@ void assertAutoFix(string before, string after, const StaticAnalysisConfig confi
remove(testFileName);
}
f.write(before);
f.rawWrite(before);
f.close();
auto dmdModule = parseDmdModule(file, before);
@ -400,7 +400,7 @@ void assertAnalyzerWarningsDMD(string code, const StaticAnalysisConfig config, b
remove(testFileName);
}
f.write(code);
f.rawWrite(code);
f.close();
auto dmdModule = parseDmdModule(file, code);