<s> """<STR_LIT>""" <EOL> __revision__ = "<STR_LIT>" <EOL> testname = "<STR_LIT>" <EOL> def LeadTrailSpacesTest ( windows ) : <EOL> "<STR_LIT>" <EOL> bugs = [ ] <EOL> for win in windows : <EOL> if not win . ref : <EOL> continue <EOL> locLeadSpaces = GetLeadSpaces ( win . WindowText ( ) ) <EOL> locTrailSpaces = GetTrailSpaces ( win . WindowText ( ) ) <EOL> refLeadSpaces = GetLeadSpaces ( win . ref . WindowText ( ) ) <EOL> refTrailSpaces = GetTrailSpaces ( win . ref . WindowText ( ) ) <EOL> diffs = [ ] <EOL> if locLeadSpaces != refLeadSpaces : <EOL> diffs . append ( ( "<STR_LIT>" , locLeadSpaces , locTrailSpaces ) ) <EOL> if locTrailSpaces != refTrailSpaces : <EOL> diffs . append ( ( "<STR_LIT>" , locTrailSpaces , refTrailSpaces ) ) <EOL> for diff , loc , ref in diffs : <EOL> bugs . append ( ( <EOL> [ win , ] , <EOL> { <EOL> "<STR_LIT>" : diff , <EOL> "<STR_LIT>" : ref , <EOL> "<STR_LIT>" : loc , <EOL> } , <EOL> testname , <EOL> <NUM_LIT:0> , ) <EOL> ) <EOL> return bugs <EOL> def GetLeadSpaces ( title ) : <EOL> "<STR_LIT>" <EOL> spaces = '<STR_LIT>' <EOL> for i in range ( <NUM_LIT:0> , len ( title ) ) : <EOL> if not title [ i ] . isspace ( ) : <EOL> break <EOL> spaces += title [ i ] <EOL> return spaces <EOL> def GetTrailSpaces ( title ) : <EOL> "<STR_LIT>" <EOL> rev = "<STR_LIT>" . join ( reversed ( title ) ) <EOL> spaces = GetLeadSpaces ( rev ) <EOL> return "<STR_LIT>" . join ( reversed ( spaces ) ) <EOL> LeadTrailSpacesTest . TestsMenus = True </s>
