check_configtool.sh: don't ignore whitespace entirely.

Instead, any amount of whitespace is treated equally.

Example of a failure not noticed before:

  //#define Z_DIR_PIN  PA_8
  //#define Z_DIR_PINPA_8
This commit is contained in:
Markus Hitter 2017-12-31 17:26:09 +01:00
parent 00aab9f01d
commit 448a040f9a
2 changed files with 4 additions and 4 deletions

View File

@ -65,8 +65,8 @@
//#define Y_INVERT_MAX
//#define Y_INVERT_ENABLE
// #define Z_STEP_PIN PB_5
// #define Z_DIR_PIN PA_8
//#define Z_STEP_PIN PB_5
//#define Z_DIR_PIN PA_8
//#define Z_MIN_PIN PA_7
//#define Z_MAX_PIN DIO31
//#define Z_ENABLE_PIN PA_9

View File

@ -27,12 +27,12 @@ git ls-files "config/*.h" | while read IN; do
perl -p0 -e 's#/\*.*?\*/##sg' "${IN}" > "${OUT}.cmp"
# Fail if the result is different except in whitespace.
if ! diff -qBbw "${OUT}" "${OUT}.cmp" ; then
if ! diff -qBb "${OUT}" "${OUT}.cmp" ; then
echo "Configtool integrity test failed on file ${IN}"
echo " Executed: ./configtool.py --load=\"${IN}\" --save=\"${OUT}\" --quit"
echo " Expected resulting settings to match, but they do not."
diff -uBbw "${OUT}" "${OUT}.cmp" | sed -e 's/^/ /' || :
diff -uBb "${OUT}" "${OUT}.cmp" | sed -e 's/^/ /' || :
exit 1
fi
done