From 7deebec55a3b13ef639a51288e03c550210392fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20L=20F=20S=20Bacci?= Date: Tue, 4 Jul 2023 10:36:35 -0300 Subject: [PATCH] =?UTF-8?q?Melhora=20informa=C3=A7=C3=B5es=20na=20sincroni?= =?UTF-8?q?za=C3=A7=C3=A3o=20de=20ws.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .tools/test/spce.php | 9 ++++++--- .tools/test/trim.sh | 4 ++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.tools/test/spce.php b/.tools/test/spce.php index abe87bca9..98874cb65 100644 --- a/.tools/test/spce.php +++ b/.tools/test/spce.php @@ -30,7 +30,7 @@ function wsfix( $filename ) $dstLines = array_filter( $dstLines , "non_empty" ); if ( $srcCount != count( $dstLines ) ) - die( "Text lines mismatch: $filename\n" ); + die( "Text line count mismatch: $filename\n" ); foreach ( $srcLines as $srcLine ) { @@ -54,8 +54,11 @@ function wsfix( $filename ) $dstLines[] = $dstLine; } - $dstText = implode( "\n" , $dstLines ); - file_put_contents( $dstName , $dstText ); + $dstTextNew = implode( "\n" , $dstLines ); + file_put_contents( $dstName , $dstTextNew ); + + if ( $dstText != $dstTextNew ) + fwrite( STDERR , "Whitespace changed: $filename\n" ); } function explode_lines( $text ) diff --git a/.tools/test/trim.sh b/.tools/test/trim.sh index a60f52831..60997772a 100755 --- a/.tools/test/trim.sh +++ b/.tools/test/trim.sh @@ -1,5 +1,5 @@ (cd pt_BR; git diff --name-only) | xargs -I %f -- php pt_BR/.tools/test/spce.php "pt_BR/%f" [ -f list.txt ] && cat list.txt | xargs -I %f -- php pt_BR/.tools/test/spce.php "pt_BR/%f" -(cd pt_BR; git diff --name-only) | xargs -I %f -- dos2unix pt_BR/.tools/test/spce.php "pt_BR/%f" -[ -f list.txt ] && cat list.txt | xargs -I %f -- dos2unix pt_BR/.tools/test/spce.php "pt_BR/%f" +(cd pt_BR; git diff --name-only) | xargs -I %f -- dos2unix -q pt_BR/.tools/test/spce.php "pt_BR/%f" +[ -f list.txt ] && cat list.txt | xargs -I %f -- dos2unix -q pt_BR/.tools/test/spce.php "pt_BR/%f"