mirror of
https://github.com/zebrajr/ladybird.git
synced 2025-12-06 00:19:53 +01:00
headless-browser: Create the expectation directory if it doesn't exist
This is convenient when adding tests to a new folder.
This commit is contained in:
parent
6affbf78c2
commit
077ae6efa1
|
|
@ -143,6 +143,8 @@ void run_dump_test(HeadlessWebView& view, Test& test, URL::URL const& url, int t
|
|||
}
|
||||
|
||||
if (Application::the().rebaseline) {
|
||||
TRY(Core::Directory::create(LexicalPath { test.expectation_path }.parent().string(), Core::Directory::CreateDirectories::Yes));
|
||||
|
||||
auto expectation_file = TRY(open_expectation_file(Core::File::OpenMode::Write));
|
||||
TRY(expectation_file->write_until_depleted(test.text));
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user