mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02:00
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.
31 lines
521 B
C++
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;
|
|
};
|
|
|
|
}
|