# Path: wcmatch/util.py
# PY37 = (3, 7) <= sys.version_info
# PY310 = (3, 10) <= sys.version_info
# UNICODE = 0
# BYTES = 1
# CASE_FS = os.path.normcase('A') != os.path.normcase('a')
# RE_NORM = re.compile(
#     r'''(?x)
#     (/|\\/)|
#     (\\[abfnrtv\\])|
#     (\\(?:U[\da-fA-F]{8}|u[\da-fA-F]{4}|x[\da-fA-F]{2}|([0-7]{1,3})))|
#     (\\N\{[^}]*?\})|
#     (\\[^NUux]) |
#     (\\[NUux])
#     '''
# )
# RE_BNORM = re.compile(
#     br'''(?x)
#     (/|\\/)|
#     (\\[abfnrtv\\])|
#     (\\(?:x[\da-fA-F]{2}|([0-7]{1,3})))|
#     (\\[^x]) |
#     (\\[x])
#     '''
# )
# BACK_SLASH_TRANSLATION = {
#     r"\a": '\a',
#     r"\b": '\b',
#     r"\f": '\f',
#     r"\r": '\r',
#     r"\t": '\t',
#     r"\n": '\n',
#     r"\v": '\v',
#     r"\\": r'\\',
#     br"\a": b'\a',
#     br"\b": b'\b',
#     br"\f": b'\f',
#     br"\r": b'\r',
#     br"\t": b'\t',
#     br"\n": b'\n',
#     br"\v": b'\v',
#     br"\\": br'\\'
# }
#     _PLATFORM = "windows"
#     _PLATFORM = "osx"
#     _PLATFORM = "linux"
#         FILE_ATTRIBUTE_HIDDEN = 0x2
# def platform() -> str:
# def is_case_sensitive() -> bool:
# def norm_pattern(pattern: AnyStr, normalize: Optional[bool], is_raw_chars: bool, ignore_escape: bool = False) -> AnyStr:
#     def norm(m: Match[AnyStr]) -> AnyStr:
#     def __init__(self, string: str) -> None:
#     def __iter__(self) -> "StringIter":
#     def __next__(self) -> str:
#     def match(self, pattern: Pattern[str]) -> Optional[Match[str]]:
#     def index(self) -> int:
#     def previous(self) -> str:  # pragma: no cover
#     def advance(self, count: int) -> None:  # pragma: no cover
#     def rewind(self, count: int) -> None:
#     def iternext(self) -> str:
#     def __init__(self, **kwargs: Any) -> None:
#     def __setattr__(self, name: str, value: Any) -> None:  # pragma: no cover
# def is_hidden(path: AnyStr) -> bool:
# def deprecated(message: str, stacklevel: int = 2) -> Callable[..., Any]:  # pragma: no cover
#     def _wrapper(func: Callable[..., Any]) -> Callable[..., Any]:
#         def _deprecated_func(*args: Any, **kwargs: Any) -> Any:
# def warn_deprecated(message: str, stacklevel: int = 2) -> None:  # pragma: no cover
# class StringIter:
# class Immutable:


import unittest
import re
import sys
import os
import pytest
import wcmatch.fnmatch as fnmatch
import wcmatch._wcparse as _wcparse
from unittest import mock
from wcmatch import util

    @pytest.mark.parametrize("case", cases)
    def test_cases(self, case):
        """Test case."""

        self.evaluate(case)


class TestFnMatchFilter:
    """
    Test filter.

    `cases` is used in conjunction with the `filter` command
    which takes a list of file names and returns only those which match.

    * Pattern
    * List of filenames
    * Expected result (list of filenames that matched the pattern)
    * Flags

    The default flags are `DOTMATCH`. Any flags passed through via entry are XORed.
    So if `DOTMATCH` is passed via an entry, it will actually disable the default `DOTMATCH`.
    """

    cases = [
        ['P*', ['Python', 'Ruby', 'Perl', 'Tcl'], ['Python', 'Perl'], 0],
        [b'P*', [b'Python', b'Ruby', b'Perl', b'Tcl'], [b'Python', b'Perl'], 0],
        [
            '*.p*',
            ['Test.py', 'Test.rb', 'Test.PL'],

# Path: wcmatch/util.py
# PY37 = (3, 7) <= sys.version_info
# PY310 = (3, 10) <= sys.version_info
# UNICODE = 0
# BYTES = 1
# CASE_FS = os.path.normcase('A') != os.path.normcase('a')
# RE_NORM = re.compile(
#     r'''(?x)
#     (/|\\/)|
#     (\\[abfnrtv\\])|
#     (\\(?:U[\da-fA-F]{8}|u[\da-fA-F]{4}|x[\da-fA-F]{2}|([0-7]{1,3})))|
#     (\\N\{[^}]*?\})|
#     (\\[^NUux]) |
#     (\\[NUux])
#     '''
# )
# RE_BNORM = re.compile(
#     br'''(?x)
#     (/|\\/)|
#     (\\[abfnrtv\\])|
#     (\\(?:x[\da-fA-F]{2}|([0-7]{1,3})))|
#     (\\[^x]) |
#     (\\[x])
#     '''
# )
# BACK_SLASH_TRANSLATION = {
#     r"\a": '\a',
#     r"\b": '\b',
#     r"\f": '\f',
#     r"\r": '\r',
#     r"\t": '\t',
#     r"\n": '\n',
#     r"\v": '\v',
#     r"\\": r'\\',
#     br"\a": b'\a',
#     br"\b": b'\b',
#     br"\f": b'\f',
#     br"\r": b'\r',
#     br"\t": b'\t',
#     br"\n": b'\n',
#     br"\v": b'\v',
#     br"\\": br'\\'
# }
#     _PLATFORM = "windows"
#     _PLATFORM = "osx"
#     _PLATFORM = "linux"
#         FILE_ATTRIBUTE_HIDDEN = 0x2
# def platform() -> str:
# def is_case_sensitive() -> bool:
# def norm_pattern(pattern: AnyStr, normalize: Optional[bool], is_raw_chars: bool, ignore_escape: bool = False) -> AnyStr:
#     def norm(m: Match[AnyStr]) -> AnyStr:
#     def __init__(self, string: str) -> None:
#     def __iter__(self) -> "StringIter":
#     def __next__(self) -> str:
#     def match(self, pattern: Pattern[str]) -> Optional[Match[str]]:
#     def index(self) -> int:
#     def previous(self) -> str:  # pragma: no cover
#     def advance(self, count: int) -> None:  # pragma: no cover
#     def rewind(self, count: int) -> None:
#     def iternext(self) -> str:
#     def __init__(self, **kwargs: Any) -> None:
#     def __setattr__(self, name: str, value: Any) -> None:  # pragma: no cover
# def is_hidden(path: AnyStr) -> bool:
# def deprecated(message: str, stacklevel: int = 2) -> Callable[..., Any]:  # pragma: no cover
#     def _wrapper(func: Callable[..., Any]) -> Callable[..., Any]:
#         def _deprecated_func(*args: Any, **kwargs: Any) -> Any:
# def warn_deprecated(message: str, stacklevel: int = 2) -> None:  # pragma: no cover
# class StringIter:
# class Immutable:


# Path: tests/test_fnmatch.py
import unittest
import re
import sys
import os
import pytest
import wcmatch.fnmatch as fnmatch
import wcmatch._wcparse as _wcparse
from unittest import mock
from wcmatch import util


    @pytest.mark.parametrize("case", cases)
    def test_cases(self, case):
        """Test case."""

        self.evaluate(case)


class TestFnMatchFilter:
    """
    Test filter.

    `cases` is used in conjunction with the `filter` command
    which takes a list of file names and returns only those which match.

    * Pattern
    * List of filenames
    * Expected result (list of filenames that matched the pattern)
    * Flags

    The default flags are `DOTMATCH`. Any flags passed through via entry are XORed.
    So if `DOTMATCH` is passed via an entry, it will actually disable the default `DOTMATCH`.
    """

    cases = [
        ['P*', ['Python', 'Ruby', 'Perl', 'Tcl'], ['Python', 'Perl'], 0],
        [b'P*', [b'Python', b'Ruby', b'Perl', b'Tcl'], [b'Python', b'Perl'], 0],
        [
            '*.p*',
            ['Test.py', 'Test.rb', 'Test.PL'],

            (['Test.py', 'Test.PL'] if not util.is_case_sensitive() else ['Test.py']),