-
Notifications
You must be signed in to change notification settings - Fork 5
/
test.sh
37 lines (34 loc) · 807 Bytes
/
test.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/bash
cat <<EOF
<style>
body { min-width: 100%; max-width: 100% }
.typst { width: 50%; min-width: 50%; }
.eval { width: 50%; min-width: 50%; }
</style>
EOF
for s in $(find test/typ -type d)
do
echo "## $s"
for t in $s/*.typ
do
grep -q 'Error:' $t && continue
>&2 echo $t
echo "### $t"
echo ""
echo ":::::: columns"
echo "::: {.column .typst}"
echo '````````````'
echo "#let test = (x,y) => { if x == y [✅] else [❌(#repr(x) /= #repr(y))] }" > $t.rev
cat $t >> $t.rev
cat $t
echo '````````````'
echo ":::"
echo "::: {.column .eval}"
echo '````````````'
cabal run typst-hs -fexecutable --disable-optimization -v0 -- --repr --timeout 1000 $t.rev 2>&1
echo '````````````'
echo ":::"
echo "::::::"
echo ""
done
done