# Path: tests/base.py
# class PycoreutilsBaseTest(unittest.TestCase):
#     def setUp(self):
#         self.runner = CliRunner()
#         self.cli = cli
# 
# Path: pycoreutils/commands/_basename/command.py
# def get_base_name(name, suffix, separator):
#     base_name = name.split(separator)[-1]
#     if suffix and base_name.endswith(suffix):
#         base_name = base_name[:-len(suffix)]
# 
#     return base_name


from .base import PycoreutilsBaseTest
from pycoreutils.commands._basename.command import get_base_name
from __future__ import unicode_literals




class TestBaseName(PycoreutilsBaseTest):
    def test_get_base_name(self):
        pairs = (
            ('/path/to/file.c', 'file.c', '', '/'),
            ('/path/to/file.c', 'file', '.c', '/'),
            ('', '', '.c', '/'),

# Path: tests/base.py
# class PycoreutilsBaseTest(unittest.TestCase):
#     def setUp(self):
#         self.runner = CliRunner()
#         self.cli = cli
# 
# Path: pycoreutils/commands/_basename/command.py
# def get_base_name(name, suffix, separator):
#     base_name = name.split(separator)[-1]
#     if suffix and base_name.endswith(suffix):
#         base_name = base_name[:-len(suffix)]
# 
#     return base_name


# Path: tests/test_basename.py
from .base import PycoreutilsBaseTest
from pycoreutils.commands._basename.command import get_base_name

from __future__ import unicode_literals




class TestBaseName(PycoreutilsBaseTest):
    def test_get_base_name(self):
        pairs = (
            ('/path/to/file.c', 'file.c', '', '/'),
            ('/path/to/file.c', 'file', '.c', '/'),
            ('', '', '.c', '/'),

            ('c:\\system32\\etc\\hosts.txt', 'hosts.txt', '', '\\'),