Esempio n. 1
0
def main():
	args = sys.argv[1:]
	if len(args) < 2:
		print("Usage: %s target_path dynamic_library_path" % (sys.argv[0]), file = sys.stderr)
		return -1
		
	return 0 if dylib.insert_load_command(args[0], args[1]) else -2
Esempio n. 2
0
def main():
    args = sys.argv[1:]
    if len(args) < 2:
        print("Usage: %s target_path dynamic_library_path" % (sys.argv[0]),
              file=sys.stderr)
        return -1

    return 0 if dylib.insert_load_command(args[0], args[1]) else -2
Esempio n. 3
0
 def test_inserting_load_command_into_fat_target(self):
     # given
     target = self.request_target("fat_target")
     # when
     regular_return_value = call(target)
     inserted = dylib.insert_load_command(target, self.install_name)
     new_return_value = call(target)
     # then
     self.assertEqual(regular_return_value, 0x0)
     self.assertTrue(inserted)
     self.assertEqual(new_return_value, TestDylib.magic_return_value)
Esempio n. 4
0
	def test_inserting_load_command_into_fat_target(self):
		# given
		target = self.request_target("fat_target")
		# when
		regular_return_value = call(target)
		inserted = dylib.insert_load_command(target, self.install_name)
		new_return_value = call(target)
		# then
		self.assertEqual(regular_return_value, 0x0)
		self.assertTrue(inserted)
		self.assertEqual(new_return_value, TestDylib.magic_return_value)