def test_pretty_print_empty_string(self):
        if not self.check_ruby():
            return

        # Make sure that an empty diff does not hang the process.
        pretty_patch = PrettyPatch(Executive(), self._webkit_root())
        self.assertEqual(pretty_patch.pretty_diff(""), "")
    def test_pretty_print_empty_string(self):
        if not self.check_ruby():
            return

        # Make sure that an empty diff does not hang the process.
        pretty_patch = PrettyPatch(Executive(), self._webkit_root())
        self.assertEqual(pretty_patch.pretty_diff(""), "")
    def test_pretty_diff_encodings(self):
        if not self.check_ruby():
            return

        pretty_patch = PrettyPatch(Executive(), self._webkit_root())
        pretty = pretty_patch.pretty_diff(self._diff_with_multiple_encodings)
        self.assertTrue(pretty)  # We got some output
        self.assertTrue(isinstance(pretty, str))  # It's a byte array, not unicode
    def test_pretty_diff_encodings(self):
        if not self.check_ruby():
            return

        pretty_patch = PrettyPatch(Executive(), self._webkit_root())
        pretty = pretty_patch.pretty_diff(self._diff_with_multiple_encodings)
        self.assertTrue(pretty)  # We got some output
        self.assertTrue(isinstance(pretty,
                                   str))  # It's a byte array, not unicode
    def test_pretty_diff_encodings(self):
        if not self.check_ruby():
            return

        if sys.platform == 'win32':
            # FIXME: disabled due to https://bugs.webkit.org/show_bug.cgi?id=93192
            return

        pretty_patch = PrettyPatch(Executive(), self._webkit_root())
        pretty = pretty_patch.pretty_diff(self._diff_with_multiple_encodings)
        self.assertTrue(pretty)  # We got some output
        self.assertIsInstance(pretty, str)  # It's a byte array, not unicode
Ejemplo n.º 6
0
    def test_pretty_diff_encodings(self):
        if not self.check_ruby():
            self.skipTest("no/unsupported Ruby")
            return

        if sys.platform.startswith('win'):
            self.skipTest(
                "FIXME: disabled due to https://bugs.webkit.org/show_bug.cgi?id=93192"
            )
            return

        pretty_patch = PrettyPatch(Executive(), self._webkit_root())
        pretty = pretty_patch.pretty_diff(self._diff_with_multiple_encodings)
        self.assertTrue(pretty)  # We got some output
        self.assertIsInstance(pretty, bytes)  # It's a byte array, not unicode