# Path: anchorhub/compatibility.py
# def get_path_separator():
#     """
#     Returns the appropriate file path separator depending on operating
#     system. That is, when run on UNIX-like systems it returns a forward slash
#     ('/'), and for Windows it returns a backslash ('\')
#     :return: String. The file path separator for the current operating system.
#     """
#     if os.name == 'nt':
#         return '\\'
#     else:
#         return '/'
# 
# Path: anchorhub/util/getanchorhubpath.py
# def get_anchorhub_path():
#     """
#     Returns the absolute path to the AnchorHub directory. Will be used to run
#     tests using folders located within the AnchorHub root.
# 
#     :return: String path to AnchorHub directory
#     """
#     return path.abspath(path.dirname(anchorhub.__file__))
# 
# Path: anchorhub/compatibility.py
# def get_path_separator():
#     """
#     Returns the appropriate file path separator depending on operating
#     system. That is, when run on UNIX-like systems it returns a forward slash
#     ('/'), and for Windows it returns a backslash ('\')
#     :return: String. The file path separator for the current operating system.
#     """
#     if os.name == 'nt':
#         return '\\'
#     else:
#         return '/'


import os.path as path
import anchorhub.normalization.normalize_opts as n
from anchorhub.compatibility import get_path_separator
from anchorhub.util.getanchorhubpath import get_anchorhub_path
from anchorhub.compatibility import get_path_separator
    assert a['output'] == 'anchorhub-out' + get_path_separator()

    b = {'input': 'hello' + get_path_separator(),
         'output': 'dolly' + get_path_separator(),
         'is_dir': True}
    n.ensure_directories_end_in_separator(b)
    assert b['input'] == 'hello' + get_path_separator()
    assert b['output'] == 'dolly' + get_path_separator()

    c = {'input': 'fakefile.md',
         'output': 'anchorhub-out',
         'is_dir': False}
    n.ensure_directories_end_in_separator(c)
    assert c['input'] == 'fakefile.md'
    assert c['output'] == 'anchorhub-out' + get_path_separator()

def test_add_wrapper_regex():
    """
    normalize_opts.py: Test add_wrapper_regex()
    """
    a = {'open': '{', 'close': '}'}
    n.add_wrapper_regex(a)
    assert 'wrapper_regex' in a
    assert a['wrapper_regex'] == r"\{\s*#((?!\{)(?!\})\S)+\s*\}"


def test_add_is_file():
    """
    normalize_opts.py: Test add_is_file()
    """

# Path: anchorhub/compatibility.py
# def get_path_separator():
#     """
#     Returns the appropriate file path separator depending on operating
#     system. That is, when run on UNIX-like systems it returns a forward slash
#     ('/'), and for Windows it returns a backslash ('\')
#     :return: String. The file path separator for the current operating system.
#     """
#     if os.name == 'nt':
#         return '\\'
#     else:
#         return '/'
# 
# Path: anchorhub/util/getanchorhubpath.py
# def get_anchorhub_path():
#     """
#     Returns the absolute path to the AnchorHub directory. Will be used to run
#     tests using folders located within the AnchorHub root.
# 
#     :return: String path to AnchorHub directory
#     """
#     return path.abspath(path.dirname(anchorhub.__file__))
# 
# Path: anchorhub/compatibility.py
# def get_path_separator():
#     """
#     Returns the appropriate file path separator depending on operating
#     system. That is, when run on UNIX-like systems it returns a forward slash
#     ('/'), and for Windows it returns a backslash ('\')
#     :return: String. The file path separator for the current operating system.
#     """
#     if os.name == 'nt':
#         return '\\'
#     else:
#         return '/'


# Path: anchorhub/normalization/tests/test_normalize_opts.py
import os.path as path
import anchorhub.normalization.normalize_opts as n
from anchorhub.compatibility import get_path_separator
from anchorhub.util.getanchorhubpath import get_anchorhub_path
from anchorhub.compatibility import get_path_separator

    assert a['output'] == 'anchorhub-out' + get_path_separator()

    b = {'input': 'hello' + get_path_separator(),
         'output': 'dolly' + get_path_separator(),
         'is_dir': True}
    n.ensure_directories_end_in_separator(b)
    assert b['input'] == 'hello' + get_path_separator()
    assert b['output'] == 'dolly' + get_path_separator()

    c = {'input': 'fakefile.md',
         'output': 'anchorhub-out',
         'is_dir': False}
    n.ensure_directories_end_in_separator(c)
    assert c['input'] == 'fakefile.md'
    assert c['output'] == 'anchorhub-out' + get_path_separator()

def test_add_wrapper_regex():
    """
    normalize_opts.py: Test add_wrapper_regex()
    """
    a = {'open': '{', 'close': '}'}
    n.add_wrapper_regex(a)
    assert 'wrapper_regex' in a
    assert a['wrapper_regex'] == r"\{\s*#((?!\{)(?!\})\S)+\s*\}"


def test_add_is_file():
    """
    normalize_opts.py: Test add_is_file()
    """

    dir = get_anchorhub_path()