diff options
Diffstat (limited to 'tests/unicode_lint.sh')
-rw-r--r-- | tests/unicode_lint.sh | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/unicode_lint.sh b/tests/unicode_lint.sh index 969fcc5..dc9f2c0 100644 --- a/tests/unicode_lint.sh +++ b/tests/unicode_lint.sh @@ -1,6 +1,6 @@ #!/bin/bash -# `unicode_lint.sh' determines whether source files under the ./lib/ and ./programs/ directories +# `unicode_lint.sh' determines whether source files under the ./lib/, ./tests/ and ./programs/ directories # contain Unicode characters, and fails if any do. # # See https://github.com/lz4/lz4/issues/1018 @@ -16,6 +16,15 @@ if [[ $result ]]; then pass=false fi +# Scan ./tests/ for Unicode in source (*.c, *.h) files +result=$( + find ./tests/ -regex '.*\.\(c\|h\)$' -exec grep -P -n "[^\x00-\x7F]" {} \; -exec echo "{}: FAIL" \; +) +if [[ $result ]]; then + echo "$result" + pass=false +fi + # Scan ./programs/ for Unicode in source (*.c, *.h) files result=$( find ./programs/ -regex '.*\.\(c\|h\)$' -exec grep -P -n "[^\x00-\x7F]" {} \; -exec echo "{}: FAIL" \; |