Files
pvxs/test/capturestd.h
Michael Davidsaver 1d182cb031 test iocsh functions
2026-02-27 08:16:23 +00:00

28 lines
554 B
C++

/**
* Copyright - See the COPYRIGHT that is included with this distribution.
* pvxs is distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
*/
#ifndef CAPTURESTD_H
#define CAPTURESTD_H
#include <string>
#include <functional>
struct CaptureStd
{
std::string m_out, m_err;
CaptureStd(const std::function<void()>& fn);
const std::string& out() const {
return m_out;
}
const std::string& err() const {
return m_err;
}
};
#endif // CAPTURESTD_H