Commit 927d7458 authored by Alexandre Duret-Lutz's avatar Alexandre Duret-Lutz
Browse files

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.
parent f5fea748
......@@ -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
:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment