80columns.test: Add workaround for non-unicode systems.
* src/sanity/80columns.test: If the system cannot count unicode characters, only search for long ascii lines.
This commit is contained in:
parent
f5fea7484b
commit
927d745805
1 changed files with 11 additions and 2 deletions
|
|
@ -6,6 +6,16 @@ set -e
|
|||
|
||||
rm -f failures
|
||||
|
||||
if [ "`echo '{r₁|r₂|r₃}' | wc -m`" != 11 ]; then
|
||||
# The current local does not grok unicode.
|
||||
# We still run this test, but only on lines are that purely ascii.
|
||||
x='[^ -~]' # This blank is a tab.
|
||||
else
|
||||
x='.'
|
||||
fi
|
||||
x="$x$x$x$x$x$x$x$x$x" # 9x
|
||||
x="$x$x$x$x$x$x$x$x$x" # 81x
|
||||
|
||||
for dir in "${INCDIR-..}" "${INCDIR-..}"/../iface; do
|
||||
|
||||
find "$dir" \( -name "${1-*}.hh" \
|
||||
|
|
@ -13,8 +23,7 @@ for dir in "${INCDIR-..}" "${INCDIR-..}"/../iface; do
|
|||
-o -name "${1-*}.cc" \
|
||||
-o -name "${1-*}.test" \) -a -type f -a -print |
|
||||
while read file; do
|
||||
x='........................................'
|
||||
if (expand $file | grep -q $x.$x) 2>/dev/null; then
|
||||
if (expand $file | grep -q $x) 2>/dev/null; then
|
||||
if grep 'GNU Bison' "$file" >/dev/null ||
|
||||
grep 'generated by flex' "$file" >/dev/null ; then
|
||||
:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue