From 428e3d07b90f36f8bee9814f7be9a5a5013af1ad Mon Sep 17 00:00:00 2001 From: Alexey Edelev Date: Mon, 17 Mar 2025 22:27:30 +0100 Subject: [PATCH] Fix the cmdLineInvalidExportMacro The test was faulty positive because of invalid command line. The input file name was missing there, so protoc was failing to generate code, but didn't test the actual invalid EXPORT_MACRO name. Pick-to: 6.8 6.9 Change-Id: Ib57235fb22c740dc30aec58076833c8f6de4a250 Reviewed-by: Dennis Oberst --- tests/auto/protobufgen/tst_qtprotobufgen.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/auto/protobufgen/tst_qtprotobufgen.cpp b/tests/auto/protobufgen/tst_qtprotobufgen.cpp index f6743f20..38a1bc7c 100644 --- a/tests/auto/protobufgen/tst_qtprotobufgen.cpp +++ b/tests/auto/protobufgen/tst_qtprotobufgen.cpp @@ -252,9 +252,12 @@ void qtprotobufgenTest::cmdLineInvalidExportMacro() QProcess process; process.setWorkingDirectory(cmdLineGeneratedPath()); - process.startCommand(ProtocPath + QString(" ") + PluginKey + QtprotobufgenPath + OptKey - + exportMacroCmd + OutKey + outputDirectory.absolutePath() + IncludeKey - + expectedResultPath() + "qtprotobufgen.proto" + allow_proto3_optional); + process.startCommand(ProtocPath + QString(" ") + PluginKey + QtprotobufgenPath + + OptKey + exportMacroCmd + + OutKey + outputDirectory.absolutePath() + + IncludeKey + expectedResultPath() + + + " " + expectedResultPath() + "/qtprotobufgen.proto" + + allow_proto3_optional); QVERIFY2(process.waitForStarted(), msgProcessStartFailed(process).constData()); if (!process.waitForFinished()) { process.kill();