mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-11-23 12:05:47 +00:00
Add a test to ensure source files do not have Byte Order Mark
This commit is contained in:
Executable
+22
@@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
# This script checks for Byte Order Marks in source files
|
||||
# which in some places may break compilation/runtime of eSpeak NG
|
||||
# Look for more at: https://en.wikipedia.org/wiki/Byte_order_mark
|
||||
|
||||
echo -n "testing for Byte Order Marks in source files ... "
|
||||
|
||||
# TODO checking for other encodings (e.g. UTF-16, UTF-32, UTF-7) needs more elaborate search,
|
||||
# otherwise it shows many false positives
|
||||
|
||||
egrep -rlI $'\xEF\xBB\xBF' . | tee tests/bom.check >/dev/null # UTF-8
|
||||
|
||||
if [ -s tests/bom.check ] ; then
|
||||
echo "found:"
|
||||
cat tests/bom.check
|
||||
false
|
||||
else
|
||||
rm tests/bom.check
|
||||
echo "none found"
|
||||
true
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user