# Path: javatools/classdiff.py
# def main(args=sys.argv):
#     """
#     Main entry point for the classdiff 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.classdiff import main
# it under the terms of the GNU Lesser General Public License as
# published by the Free Software Foundation; either version 3 of the
# 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 javatools/classdiff.py

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



class ClassdiffTest(TestCase):

    # Options from relevant option groups are accepted:
    def test_options_accepted(self):
        left = get_data_fn(os.path.join("test_classdiff", "Sample1.class"))
        right = get_data_fn(os.path.join("test_classdiff", "Sample2.class"))
        # General options:

# Path: javatools/classdiff.py
# def main(args=sys.argv):
#     """
#     Main entry point for the classdiff CLI
#     """
# 
#     parser = create_optparser(args[0])
#     return cli(parser.parse_args(args[1:]))


# Path: tests/classdiff.py
import os
from unittest import TestCase
from . import get_data_fn
from javatools.classdiff import main

# it under the terms of the GNU Lesser General Public License as
# published by the Free Software Foundation; either version 3 of the
# 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 javatools/classdiff.py

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



class ClassdiffTest(TestCase):

    # Options from relevant option groups are accepted:
    def test_options_accepted(self):
        left = get_data_fn(os.path.join("test_classdiff", "Sample1.class"))
        right = get_data_fn(os.path.join("test_classdiff", "Sample2.class"))
        # General options:

        self.assertEqual(1, main(["argv0", "-q", left, right]))