Skip to content

Commit 6976172

Browse files
author
Vladislav Kalugin
committed
Don't print empty test files
1 parent 1d10a00 commit 6976172

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

server/src/streams/tests/ServerTestsWriter.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ bool ServerTestsWriter::writeFileAndSendResponse(const tests::Tests &tests,
4242
double percent,
4343
bool isCompleted) const {
4444
fs::path testFilePath = testDirPath / tests.relativeFileDir / tests.testFilename;
45-
FileSystemUtils::writeToFile(testFilePath, tests.code);
45+
if (!tests.code.empty()) {
46+
FileSystemUtils::writeToFile(testFilePath, tests.code);
47+
}
4648
if (!hasStream()) {
4749
return false;
4850
}

0 commit comments

Comments
 (0)