#!/usr/bin/env python3

from pike import match


def test_simple():
    assert match('a', 'aab')
    assert match('aa', 'aab')
    assert match('aab', 'aab')
    assert not match('aac', 'aab')


def test_star():
    assert match('a*b', 'b')
    assert match('a*b', 'ab')
    assert match('a*b', 'aab')
    assert not match('a*b', 'c')


def test_anchor():
    assert match('^a*b$', 'b')
    assert match('^a*b$', 'ab')
    assert match('^a*b$', 'aab')
    assert not match('^a*b$', 'caab')
    assert not match('^a*b$', 'aabc')

2408db8377f8330138fda871bf6d5a0dec216751
<mask token>


def test_simple():
    assert match('a', 'aab')
    assert match('aa', 'aab')
    assert match('aab', 'aab')
    assert not match('aac', 'aab')


<mask token>

<mask token>


def test_simple():
    assert match('a', 'aab')
    assert match('aa', 'aab')
    assert match('aab', 'aab')
    assert not match('aac', 'aab')


def test_star():
    assert match('a*b', 'b')
    assert match('a*b', 'ab')
    assert match('a*b', 'aab')
    assert not match('a*b', 'c')


<mask token>

<mask token>


def test_simple():
    assert match('a', 'aab')
    assert match('aa', 'aab')
    assert match('aab', 'aab')
    assert not match('aac', 'aab')


def test_star():
    assert match('a*b', 'b')
    assert match('a*b', 'ab')
    assert match('a*b', 'aab')
    assert not match('a*b', 'c')


def test_anchor():
    assert match('^a*b$', 'b')
    assert match('^a*b$', 'ab')
    assert match('^a*b$', 'aab')
    assert not match('^a*b$', 'caab')
    assert not match('^a*b$', 'aabc')

from pike import match


def test_simple():
    assert match('a', 'aab')
    assert match('aa', 'aab')
    assert match('aab', 'aab')
    assert not match('aac', 'aab')


def test_star():
    assert match('a*b', 'b')
    assert match('a*b', 'ab')
    assert match('a*b', 'aab')
    assert not match('a*b', 'c')


def test_anchor():
    assert match('^a*b$', 'b')
    assert match('^a*b$', 'ab')
    assert match('^a*b$', 'aab')
    assert not match('^a*b$', 'caab')
    assert not match('^a*b$', 'aabc')

#!/usr/bin/env python3

from pike import match


def test_simple():
    assert match('a', 'aab')
    assert match('aa', 'aab')
    assert match('aab', 'aab')
    assert not match('aac', 'aab')


def test_star():
    assert match('a*b', 'b')
    assert match('a*b', 'ab')
    assert match('a*b', 'aab')
    assert not match('a*b', 'c')


def test_anchor():
    assert match('^a*b$', 'b')
    assert match('^a*b$', 'ab')
    assert match('^a*b$', 'aab')
    assert not match('^a*b$', 'caab')
    assert not match('^a*b$', 'aabc')
