mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 06:57:46 +00:00
Tests/LibWeb: Import my test rebaselining script
This is not a beautiful program, but it does allow you to regenerate the baseline expectation for a given layout or text test with a single command. :^)
This commit is contained in:
parent
fde86350e3
commit
427cf14d71
1 changed files with 20 additions and 0 deletions
20
Tests/LibWeb/rebaseline-libweb-test
Executable file
20
Tests/LibWeb/rebaseline-libweb-test
Executable file
|
@ -0,0 +1,20 @@
|
|||
#!/bin/bash
|
||||
set +e
|
||||
|
||||
t=$1
|
||||
if echo -n $t | grep ^file: ; then
|
||||
t=$(echo -n $t | sed s@^file://@@)
|
||||
fi
|
||||
|
||||
if echo -n $t | grep Layout ; then
|
||||
mode_flag="-d"
|
||||
else
|
||||
mode_flag="-T"
|
||||
fi
|
||||
|
||||
input_dir=$(dirname $t)
|
||||
expected_dir=$(echo $input_dir | sed s/input/expected/)
|
||||
test_name=$(basename $t .html)
|
||||
cd $SERENITY_SOURCE_DIR/Build/lagom/Ladybird
|
||||
mkdir -p $expected_dir
|
||||
./headless-browser $mode_flag --layout-test-mode $input_dir/$test_name.html > $expected_dir/$test_name.txt
|
Loading…
Add table
Add a link
Reference in a new issue