mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-23 16:10:20 +00: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
Notes:
github-actions[bot]
2024-11-17 22:22:58 +00:00
Author: https://github.com/trflynn89 Commit: https://github.com/LadybirdBrowser/ladybird/commit/077ae6efa13 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2370
1 changed files with 2 additions and 0 deletions
|
@ -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 a new issue