Skip to content

Commit

Permalink
Melhora informações na sincronização de ws.
Browse files Browse the repository at this point in the history
  • Loading branch information
André L F S Bacci committed Jul 4, 2023
1 parent b4e125f commit 7deebec
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
9 changes: 6 additions & 3 deletions .tools/test/spce.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
{
Expand All @@ -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 )
Expand Down
4 changes: 2 additions & 2 deletions .tools/test/trim.sh
Original file line number Diff line number Diff line change
@@ -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"

0 comments on commit 7deebec

Please sign in to comment.