<s> """<STR_LIT>""" <EOL> import TestGyp <EOL> import filecmp <EOL> import os <EOL> import stat <EOL> import sys <EOL> if sys . platform == '<STR_LIT:win32>' : <EOL> test = TestGyp . TestGyp ( formats = [ '<STR_LIT>' ] ) <EOL> os . makedirs ( '<STR_LIT>' ) <EOL> read_only_files = [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] <EOL> for f in read_only_files : <EOL> test . write ( f , '<STR_LIT>' ) <EOL> test . chmod ( f , stat . S_IREAD ) <EOL> if os . access ( f , os . W_OK ) : <EOL> test . fail_test ( ) <EOL> os . makedirs ( test . built_file_path ( '<STR_LIT>' ) ) <EOL> for f in read_only_files : <EOL> f = os . path . join ( '<STR_LIT>' , f ) <EOL> test . write ( test . built_file_path ( f ) , '<STR_LIT>' ) <EOL> test . chmod ( test . built_file_path ( f ) , stat . S_IREAD ) <EOL> if os . access ( test . built_file_path ( f ) , os . W_OK ) : <EOL> test . fail_test ( ) <EOL> test . run_gyp ( '<STR_LIT>' ) <EOL> test . build ( '<STR_LIT>' ) <EOL> for f in read_only_files : <EOL> f = os . path . join ( '<STR_LIT>' , f ) <EOL> test . must_contain ( test . built_file_path ( f ) , '<STR_LIT>' ) <EOL> for f in read_only_files : <EOL> if not filecmp . cmp ( f , test . built_file_path ( os . path . join ( '<STR_LIT>' , f ) ) ) : <EOL> test . fail_test ( ) <EOL> test . pass_test ( ) </s>
