Files
ladybird/Tests/LibWeb/test-web/CaptureFile.h
Jonathan Gamble be7266326c test-web: Consolidate output capture handling
Use files instead of buffers. Consolidate stderr and stdout into one
view. Break handling out into TestRunCapture and CaptureFile helper
classes. We will use them to log output from ALL processes in the next
commit.
2026-04-15 17:09:50 +02:00

31 lines
521 B
C++

/*
* Copyright (c) 2026, The Ladybird Developers
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <AK/ByteString.h>
#include <AK/OwnPtr.h>
#include <AK/StringView.h>
#include <LibCore/File.h>
namespace TestWeb {
class CaptureFile {
public:
CaptureFile() = default;
explicit CaptureFile(ByteString);
void write(StringView);
ErrorOr<bool> transfer_to_output_file();
private:
ByteString m_destination_path;
ByteString m_writer_path;
OwnPtr<Core::File> m_writer;
};
}