blob: ed555d75ef670a918a2b451cb0730cb62bde56c1 (
plain)
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
|
#!/bin/sh
check() {
cat > src.txt <<EOF
$1
EOF
cat > tmp.txt <<EOF
$2
EOF
sort tmp.txt > wanted.txt
./gwenview_1.4_osdformat.sh < src.txt | sort > dst.txt
if diff -uwB --brief wanted.txt dst.txt ; then
echo ok
else
echo "
--------------
# From:
$1
# To:
$2
# Got:
"
cat dst.txt
echo "# Wanted:"
cat wanted.txt
echo "
--------------
"
fi
}
check "osd mode=0" "osdFormat="
check "osd mode=1" "osdFormat=%p"
check "osd mode=2" "osdFormat=%c"
check "osd mode=3" "osdFormat=%p\\n%c"
check "osd mode=3
something else" "osdFormat=%p\\n%c
something else"
check "osd mode=4
free output format=zog\\nzog" "osdFormat=zog\\nzog"
|