mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-26 09:30:24 +00:00
Userland: Allow passing a specific HTML file to the "ht" test program
This commit is contained in:
parent
f4985ca113
commit
ede44853d1
Notes:
sideshowbarker
2024-07-19 06:12:23 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/ede44853d14
1 changed files with 6 additions and 2 deletions
|
@ -29,10 +29,14 @@
|
|||
#include <AK/ByteBuffer.h>
|
||||
#include <AK/LogStream.h>
|
||||
|
||||
int main(int, char**)
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
// This is a temporary test program to aid with bringing up the new HTML parser. :^)
|
||||
auto file_or_error = Core::File::open("/home/anon/www/simple.html", Core::File::ReadOnly);
|
||||
const char* input_path = "/home/anon/www/simple.html";
|
||||
if (argc > 1)
|
||||
input_path = argv[1];
|
||||
|
||||
auto file_or_error = Core::File::open(input_path, Core::File::ReadOnly);
|
||||
if (file_or_error.is_error())
|
||||
return 1;
|
||||
auto contents = file_or_error.value()->read_all();
|
||||
|
|
Loading…
Reference in a new issue