<commit_before>#! /bin/bash

set -e
set -o pipefail

configure_args=(
    --prefix=$PREFIX
)

./configure "${configure_args[@]}" || { cat config.log ; exit 1 ; }
make # note: parallel build doesn't work reliably due to lack of rule defining creation of `giza.mod`

make check

ctests="
arrow
band
box
colour-index
error-bars
format-number
line-cap
line-style
openclose
points
qtext
rectangle
set-line-width
vector
window
"

for t in $ctests ; do
    echo /png |test/C/test-$t
done

./test/C/test-change-page <<EOF
/png
/pdf
/svg
EOF
./test/C/test-environment <<EOF
/png
/png
/png
/png
/png
/png
EOF
./test/C/test-pdf
./test/C/test-png<commit_msg>giza: skip tests that require an X display<commit_after>#! /bin/bash

set -e
set -o pipefail

configure_args=(
    --prefix=$PREFIX
)

./configure "${configure_args[@]}" || { cat config.log ; exit 1 ; }
make # note: parallel build doesn't work reliably due to lack of rule defining creation of `giza.mod`

make check

ctests="
arrow
band
colour-index
error-bars
format-number
line-cap
line-style
points
qtext
rectangle
set-line-width
vector
window
"

for t in $ctests ; do
    echo /png |test/C/test-$t
done

./test/C/test-change-page <<EOF
/png
/pdf
/svg
EOF
./test/C/test-environment <<EOF
/png
/png
/png
/png
/png
/png
EOF
./test/C/test-pdf
./test/C/test-png
{'fraction_non_alphanumeric': 0.14001530221882172, 'fraction_numerical': 0.001530221882172915, 'mean_word_length': 3.3026315789473686, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5485526', 'n_tokens_mistral': 501, 'n_tokens_neox': 490, 'n_words': 154}