# Path: javatools/jarinfo.py
# def main(args=sys.argv):
#     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.jarinfo import main
# This library is free software; you can redistribute it and/or modify
# 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/jarinfo.py

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



class JarinfoTest(TestCase):

    jar = get_data_fn(os.path.join("test_jarinfo", "Sample.jar"))

    # classinfo-specific option is accepted:
    def test_classinfo_options(self):

# Path: javatools/jarinfo.py
# def main(args=sys.argv):
#     parser = create_optparser(args[0])
#     return cli(parser.parse_args(args[1:]))


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

# This library is free software; you can redistribute it and/or modify
# 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/jarinfo.py

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



class JarinfoTest(TestCase):

    jar = get_data_fn(os.path.join("test_jarinfo", "Sample.jar"))

    # classinfo-specific option is accepted:
    def test_classinfo_options(self):

        self.assertEqual(0, main(["argv0", "-p", self.jar]))