summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYann Collet <cyan@fb.com>2021-08-09 12:33:20 (GMT)
committerYann Collet <cyan@fb.com>2021-08-09 12:33:20 (GMT)
commit57ed27f46ef2870c2d692d82ec7d4fcb759bfba9 (patch)
treedb6916549904ce56e4c28094a62a417a5643f8bb
parent1a6e81310ec8311efcdeaa6a858f37e59b741750 (diff)
downloadlz4-57ed27f46ef2870c2d692d82ec7d4fcb759bfba9.zip
lz4-57ed27f46ef2870c2d692d82ec7d4fcb759bfba9.tar.gz
lz4-57ed27f46ef2870c2d692d82ec7d4fcb759bfba9.tar.bz2
minor documentation for unicode_lint
-rw-r--r--tests/unicode_lint.sh14
1 files changed, 9 insertions, 5 deletions
diff --git a/tests/unicode_lint.sh b/tests/unicode_lint.sh
index dc9f2c0..cd65d2d 100644
--- a/tests/unicode_lint.sh
+++ b/tests/unicode_lint.sh
@@ -5,9 +5,11 @@
#
# See https://github.com/lz4/lz4/issues/1018
+echo "Ensure no unicode character is present in source files *.{c,h}"
pass=true
# Scan ./lib/ for Unicode in source (*.c, *.h) files
+echo "Scanning lib/"
result=$(
find ./lib/ -regex '.*\.\(c\|h\)$' -exec grep -P -n "[^\x00-\x7F]" {} \; -exec echo "{}: FAIL" \;
)
@@ -16,18 +18,20 @@ if [[ $result ]]; then
pass=false
fi
-# Scan ./tests/ for Unicode in source (*.c, *.h) files
+# Scan ./programs/ for Unicode in source (*.c, *.h) files
+echo "Scanning programs/"
result=$(
- find ./tests/ -regex '.*\.\(c\|h\)$' -exec grep -P -n "[^\x00-\x7F]" {} \; -exec echo "{}: FAIL" \;
+ find ./programs/ -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
+# Scan ./tests/ for Unicode in source (*.c, *.h) files
+echo "Scanning tests/"
result=$(
- find ./programs/ -regex '.*\.\(c\|h\)$' -exec grep -P -n "[^\x00-\x7F]" {} \; -exec echo "{}: FAIL" \;
+ find ./tests/ -regex '.*\.\(c\|h\)$' -exec grep -P -n "[^\x00-\x7F]" {} \; -exec echo "{}: FAIL" \;
)
if [[ $result ]]; then
echo "$result"
@@ -35,7 +39,7 @@ if [[ $result ]]; then
fi
if [ "$pass" = true ]; then
- echo "All tests successful."
+ echo "All tests successful: no unicode character detected"
echo "Result: PASS"
exit 0
else