summaryrefslogtreecommitdiff
path: root/db-4.8.30/test/scr010/chk.str
blob: 18e757b8bbafefe982c5a2f77711140877a1c621 (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
40
41
42
#!/bin/sh -
#
# $Id$
#
# Check spelling in quoted strings.

d=../..

[ -f $d/LICENSE ] || {
	echo 'FAIL: cannot find source distribution directory.'
	exit 1
}

t1=__t1

sed -e '/^#include/d' \
    -e '/"/!d' \
    -e 's/^[^"]*//' \
    -e 's/%s/ /g' \
    -e 's/[^"]*$//' \
    -e 's/\\[nt]/ /g' \
    `find $d -name '*.[ch]' -o -name '*.cpp' -o -name '*.java' |
    sed -e '/\/perl\//d' -e '/\/test_erlang\//d'` |
spell | sort -u | comm -23 /dev/stdin spell.ok > $t1

test -s $t1 && {
	cat $t1
	echo "FAIL: found questionable spelling in strings."
	exit 1
}

egrep -h '/\* | \* ' \
    `find $d -name '*.[ch]' -o -name '*.cpp' | sed -e '/\/perl\//d' -e '/\/test_erlang\//d'` |
spell | sort -u | comm -23 /dev/stdin spell.ok | tee /tmp/f/1 > $t1

test -s $t1 && {
	cat $t1
	echo "FAIL: found questionable spelling in comments."
	exit 1
}

exit 0