def test_options_accepted(self): left = get_data_fn(os.path.join("test_jardiff", "ec.jar")) right = get_data_fn(os.path.join("test_jardiff", "ec-tampered.jar")) # General options: self.assertEqual(1, main(["argv0", "-q", left, right])) # JAR checking options: self.assertEqual(0, main(["argv0", "--ignore-jar-signature", left, right])) # Class checking options: self.assertEqual(1, main(["argv0", "--ignore-platform-up", left, right])) # Reporting options: self.assertEqual(1, main(["argv0", "--report-dir=foo", left, right])) # JSON reporting options: self.assertEqual(1, main(["argv0", "--json", "--json-indent=4", left, right])) # HTML reporting options: self.assertEqual(1, main(["argv0", "--html-copy-data=foo", left, right]))
def test_json_binary_diff(self): left = get_data_fn(os.path.join("test_jardiff", "ec.jar")) right = get_data_fn(os.path.join("test_jardiff", "ec-tampered.jar")) self.assertEqual(1, main(["argv0", "--json", left, right]))