diff options
author | Nate <37554478+servusdei2018@users.noreply.github.com> | 2021-08-08 19:10:58 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-08 19:10:58 (GMT) |
commit | 424e1d9622c557d7b94b55a31e9f91938b69d5e4 (patch) | |
tree | e453aac11be390681f0a9b8ae66701b18cd838c9 | |
parent | eb70459803b8ea1d879c011ed5c8f5d5c16d250b (diff) | |
download | lz4-424e1d9622c557d7b94b55a31e9f91938b69d5e4.zip lz4-424e1d9622c557d7b94b55a31e9f91938b69d5e4.tar.gz lz4-424e1d9622c557d7b94b55a31e9f91938b69d5e4.tar.bz2 |
tests(tests/unicode_lint.sh): expand unicode lint to the ./tests/ directory
-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" \; |