gioser

tawasuyu/taffy

A high performance rust-powered UI layout library

HTML 5544Rust 87Markdown 12TOML 91924 Definiciones

⎇ 0.4.x scripts/diff-test-fixtures-with-yoga.sh Shell · 19 líneas · 865 B Historia crudo

Import yoga tests (#320) e05b9093d · Nico Burns ·

1#!/bin/bash
2
3if [[ ${YOGA_FIXTURE_DIR+dummy} == "" ]]; then
4  echo "Error: YOGA_FIXTURE_DIR not set";
5  echo "Please set the YOGA_FIXTURE_DIR environment variable to the absolute path of the gentest/fixtures dir in a local copy of the yoga repo";
6  exit 1;
7fi
8
9if [ ! -d "$YOGA_FIXTURE_DIR" ]; then
10  echo "YOGA_FIXTURE_DIR directory $YOGA_FIXTURE_DIR does not exist."
11  exit 1;
12fi
13
14YOGA_TEST_LIST=$(rg '<div id="([a-z_]*)".*' --replace '$1' -o --no-line-number --no-filename $YOGA_FIXTURE_DIR | grep -v '^$' | sed -E 's/^(column_row|row|column)_gap/gap_\1_gap/' | sort)
15
16TAFFY_FIXTURE_DIR=$(SELF=$(dirname "$0") && bash -c "cd \"$SELF\" && cd ../test_fixtures && pwd")
17TAFFY_TEST_LIST=$(cd $TAFFY_FIXTURE_DIR && fd -x echo {.} | grep -v '^grid' | sed -E 's/^x(.*)/\1--disabled/' | sort)
18
19diff -U 1000000 --color <(echo "$YOGA_TEST_LIST") <(echo "$TAFFY_TEST_LIST")