blob: 39319d6b44ae70be1d7d4421cb34a13cad23aaa7 (
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
48
49
50
51
52
|
#!/bin/sh
set -e
here=$(dirname $0)
fail=0
style=$(mktemp)
trap "rm -f $style" EXIT
cat >$style <<EOF
# stuff
url.fg = red
[viewer]
*.normal=true
*.default=true
url.underline = true # cxwlkj
header.bold= true # comment
signature.dim=true
diff_meta.bold =true
diff_chunk.dim= true
invalid . xxx = lkjfdslkjfdsqqqqqlkjdsq
diff_add.fg= #00ff00 # comment
# comment
diff_del.fg= 1 # comment2
quote_*.fg =6
quote_*.dim=true
quote_1.dim=false
[user]
foo = bar
EOF
export AERC_STYLESET=$style
export AERC_OSC8_URLS=1
for vec in $here/vectors/*.in; do
tool=$(basename $vec | sed 's/-.*//')
expected=${vec%%.in}.expected
tmp=$(mktemp)
if ! $FILTERS_TEST_PREFIX $here/../$tool -f $vec > $tmp; then
fail=1
fi
if diff -u "$expected" "$tmp"; then
echo "ok $tool < $vec > $tmp"
else
echo "error $tool < $vec > $tmp"
fail=1
fi
rm -f -- "$tmp"
done
exit $fail
|