Ejemplo n.º 1
0
 def test_parse(self):
     args = update.parse_commands(['-f', test_file])
     assert len(args.code) == 36, "wrong code length: %s"%len(args.code)
     code1 = args.code
     assert args.version == '1.0.0', "wrong version: %s"%args.version
     args = update.parse_commands(['-v', '1.0.127', '-f', test_file])
     assert args.version == '1.0.127', "wrong version: %s"%args.version
     assert len(args.code) == 36, "wrong code length: %s"%len(args.code)
     assert code1 != args.code, "these shouldn't match: %s != %s"%(code1, args.code)
     assert 'test.vdproj' in args.vdproj, "Should be our test file: %s"%args.vdproj
Ejemplo n.º 2
0
    def test_everything(self):
        build = 125
        args = update.parse_commands(['-v','1.0.%d'%build, '-f', test_file])
        update.replace_code_and_version(args.vdproj, args.version, args.code)

        self.compare_files()