mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 05:47:35 +00:00
Userland: Allow passing a specific HTML file to the "ht" test program
This commit is contained in:
parent
f4985ca113
commit
ede44853d1
1 changed files with 6 additions and 2 deletions
|
@ -29,10 +29,14 @@
|
||||||
#include <AK/ByteBuffer.h>
|
#include <AK/ByteBuffer.h>
|
||||||
#include <AK/LogStream.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. :^)
|
// 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())
|
if (file_or_error.is_error())
|
||||||
return 1;
|
return 1;
|
||||||
auto contents = file_or_error.value()->read_all();
|
auto contents = file_or_error.value()->read_all();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue