init
Some checks failed
Docker. / Ubuntu (push) Has been cancelled
User-agent updater. / User-agent (push) Failing after 15s
Lock Threads / lock (push) Failing after 10s
Waiting for answer. / waiting-for-answer (push) Failing after 22s
Needs user action. / needs-user-action (push) Failing after 8s
Can't reproduce. / cant-reproduce (push) Failing after 8s
Close stale issues and PRs / stale (push) Has been cancelled
Some checks failed
Docker. / Ubuntu (push) Has been cancelled
User-agent updater. / User-agent (push) Failing after 15s
Lock Threads / lock (push) Failing after 10s
Waiting for answer. / waiting-for-answer (push) Failing after 22s
Needs user action. / needs-user-action (push) Failing after 8s
Can't reproduce. / cant-reproduce (push) Failing after 8s
Close stale issues and PRs / stale (push) Has been cancelled
This commit is contained in:
34
Telegram/ThirdParty/kcoreaddons/autotests/kprocesstest_helper.cpp
vendored
Normal file
34
Telegram/ThirdParty/kcoreaddons/autotests/kprocesstest_helper.cpp
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
This file is part of the KDE libraries
|
||||
|
||||
SPDX-FileCopyrightText: 2007 Oswald Buddenhagen <ossi@kde.org>
|
||||
|
||||
SPDX-License-Identifier: LGPL-2.0-or-later
|
||||
*/
|
||||
|
||||
#include "kprocesstest_helper.h"
|
||||
#include <kprocess.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
if (argc < 2) {
|
||||
printf("Missing parameter");
|
||||
return -1;
|
||||
}
|
||||
KProcess p;
|
||||
p.setShellCommand(QString::fromLatin1("echo " EOUT "; echo " EERR " >&2"));
|
||||
p.setOutputChannelMode(static_cast<KProcess::OutputChannelMode>(atoi(argv[1])));
|
||||
fputs(POUT, stdout);
|
||||
fflush(stdout);
|
||||
p.execute();
|
||||
fputs(ROUT, stdout);
|
||||
fputs(p.readAllStandardOutput().constData(), stdout);
|
||||
fputs(RERR, stdout);
|
||||
if (p.outputChannelMode() != KProcess::MergedChannels) {
|
||||
fputs(p.readAllStandardError().constData(), stdout);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user