blob: f8554c0c9b5003eec066dfbe27ac25ee80dfb636 (
plain) (
blame)
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
38
39
40
41
42
43
44
45
46
47
|
#!/bin/sh
set -e
cd "${0%/*}"
download()
{
s="$(basename "$1" .txt)"
test -f "data/$s" ||
wget -q "https://www.unicode.org/Public/15.1.0/ucd/$1" -O "data/$s"
}
readonly FLAGS='
-std=c23 -I../include
-Og -ggdb3
-Wall -Wextra -Wpedantic
-Wno-pointer-sign
-Wno-attributes
-fsanitize=address,undefined
'
(cd ..; ./make)
download 'auxiliary/GraphemeBreakTest.txt'
download 'auxiliary/WordBreakTest.txt'
grep '^[^#]' data/CasefoldTest >casefold.in
grep '^[^#]' data/LowercaseTest >lower.in
grep '^[^#]' data/TitlecaseTest >title.in
grep '^[^#]' data/UppercaseTest >upper.in
grep '^[^#]' data/WordHumanBreakTest >wbrk-human.in
sed -En 's/\s+//g; s/÷?#.*//g; /./p' data/GraphemeBreakTest >gbrk.in
sed -En 's/\s+//g; s/÷?#.*//g; /./p' data/WordBreakTest >wbrk.in
for src in *.c
do
gcc $FLAGS -o "${src%.*}" "$src" ../libmlib.a
done
trap "$(
find . -maxdepth 1 \
-type f -executable \
-not -name run-tests \
-exec echo rm "*.in" {} +
)" EXIT
find . -type f -executable -not -name run-tests -exec {} \;
|