diff options
author | Yann Collet <Cyan4973@users.noreply.github.com> | 2021-08-09 12:29:20 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-09 12:29:20 (GMT) |
commit | 1a6e81310ec8311efcdeaa6a858f37e59b741750 (patch) | |
tree | c97de1b7b8beb5f2534ec5f72ddfe726f4ad585f /tests/unicode_lint.sh | |
parent | eb70459803b8ea1d879c011ed5c8f5d5c16d250b (diff) | |
parent | b13108a5b695c254ea6e7e50d11821466f96e6ec (diff) | |
download | lz4-1a6e81310ec8311efcdeaa6a858f37e59b741750.zip lz4-1a6e81310ec8311efcdeaa6a858f37e59b741750.tar.gz lz4-1a6e81310ec8311efcdeaa6a858f37e59b741750.tar.bz2 |
Merge pull request #1020 from servusdei2018/dev
ci: merge unicode lint to github actions and expand test coverage to ./tests/ directory
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" \; |