# Path: javatools/jardiff.py
# def cli_jars_diff(options, left, right):
#     from .report import quick_report, Reporter
#     from .report import JSONReportFormat, TextReportFormat
# 
#     reports = getattr(options, "reports", tuple())
#     if reports:
#         rdir = options.report_dir or "./"
# 
#         rpt = Reporter(rdir, JarReport.report_name, options)
#         rpt.add_formats_by_name(reports)
# 
#         delta = JarReport(left, right, rpt)
# 
#     else:
#         delta = JarChange(left, right)
# 
#     delta.check()
# 
#     if not options.silent:
#         if options.json:
#             quick_report(JSONReportFormat, delta, options)
#         else:
#             quick_report(TextReportFormat, delta, options)
# 
#     if (not delta.is_change()) or delta.is_ignored(options):
#         return 0
#     else:
#         return 1
# 
# def main(args=sys.argv):
#     """
#     main entry point for the jardiff CLI
#     """
# 
#     parser = create_optparser(args[0])
#     return cli(parser.parse_args(args[1:]))


import os
from unittest import TestCase
from . import get_data_fn
from javatools.jardiff import cli_jars_diff, main
# License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, see
# <http://www.gnu.org/licenses/>.


"""
unit tests for creating/modifying JAR files with python-javatools.

author: Konstantin Shemyak  <konstantin@shemyak.com>
license: LGPL v.3
"""



class OptionsHolder(object):
    pass


class JardiffTest(TestCase):

    options = OptionsHolder()

    def cli_jardiff_wrap(self, expected, left, right, message):

# Path: javatools/jardiff.py
# def cli_jars_diff(options, left, right):
#     from .report import quick_report, Reporter
#     from .report import JSONReportFormat, TextReportFormat
# 
#     reports = getattr(options, "reports", tuple())
#     if reports:
#         rdir = options.report_dir or "./"
# 
#         rpt = Reporter(rdir, JarReport.report_name, options)
#         rpt.add_formats_by_name(reports)
# 
#         delta = JarReport(left, right, rpt)
# 
#     else:
#         delta = JarChange(left, right)
# 
#     delta.check()
# 
#     if not options.silent:
#         if options.json:
#             quick_report(JSONReportFormat, delta, options)
#         else:
#             quick_report(TextReportFormat, delta, options)
# 
#     if (not delta.is_change()) or delta.is_ignored(options):
#         return 0
#     else:
#         return 1
# 
# def main(args=sys.argv):
#     """
#     main entry point for the jardiff CLI
#     """
# 
#     parser = create_optparser(args[0])
#     return cli(parser.parse_args(args[1:]))


# Path: tests/jardiff.py
import os
from unittest import TestCase
from . import get_data_fn
from javatools.jardiff import cli_jars_diff, main

# License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, see
# <http://www.gnu.org/licenses/>.


"""
unit tests for creating/modifying JAR files with python-javatools.

author: Konstantin Shemyak  <konstantin@shemyak.com>
license: LGPL v.3
"""



class OptionsHolder(object):
    pass


class JardiffTest(TestCase):

    options = OptionsHolder()

    def cli_jardiff_wrap(self, expected, left, right, message):

            self.assertEqual(expected, cli_jars_diff(self.options,