96 lines
2.8 KiB
Plaintext
96 lines
2.8 KiB
Plaintext
|
# Generated by ./test-fnmatch -s 2, do not edit.
|
||
|
# $FreeBSD$
|
||
|
failures=
|
||
|
failed() { printf '%s\n' "Failed: $1 '$2' '$3'"; failures=x$failures; }
|
||
|
# We do not treat a backslash specially in this case,
|
||
|
# but this is not the case in all shells.
|
||
|
netestmatch() { case $2 in $1) ;; *) failed netestmatch "$@";; esac; }
|
||
|
netestnomatch() { case $2 in $1) failed netestnomatch "$@";; esac; }
|
||
|
netestmatch '' ''
|
||
|
netestmatch 'a' 'a'
|
||
|
netestnomatch 'a' 'b'
|
||
|
netestnomatch 'a' 'A'
|
||
|
netestmatch '*' 'a'
|
||
|
netestmatch '*' 'aa'
|
||
|
netestmatch '*a' 'a'
|
||
|
netestnomatch '*a' 'b'
|
||
|
netestnomatch '*a*' 'b'
|
||
|
netestmatch '*a*b*' 'ab'
|
||
|
netestmatch '*a*b*' 'qaqbq'
|
||
|
netestmatch '*a*bb*' 'qaqbqbbq'
|
||
|
netestmatch '*a*bc*' 'qaqbqbcq'
|
||
|
netestmatch '*a*bb*' 'qaqbqbb'
|
||
|
netestmatch '*a*bc*' 'qaqbqbc'
|
||
|
netestmatch '*a*bb' 'qaqbqbb'
|
||
|
netestmatch '*a*bc' 'qaqbqbc'
|
||
|
netestnomatch '*a*bb' 'qaqbqbbq'
|
||
|
netestnomatch '*a*bc' 'qaqbqbcq'
|
||
|
netestnomatch '*a*a*a*a*a*a*a*a*a*a*' 'aaaaaaaaa'
|
||
|
netestmatch '*a*a*a*a*a*a*a*a*a*a*' 'aaaaaaaaaa'
|
||
|
netestmatch '*a*a*a*a*a*a*a*a*a*a*' 'aaaaaaaaaaa'
|
||
|
netestnomatch '.*.*.*.*.*.*.*.*.*.*' '.........'
|
||
|
netestmatch '.*.*.*.*.*.*.*.*.*.*' '..........'
|
||
|
netestmatch '.*.*.*.*.*.*.*.*.*.*' '...........'
|
||
|
netestnomatch '*?*?*?*?*?*?*?*?*?*?*' '123456789'
|
||
|
netestnomatch '??????????*' '123456789'
|
||
|
netestnomatch '*??????????' '123456789'
|
||
|
netestmatch '*?*?*?*?*?*?*?*?*?*?*' '1234567890'
|
||
|
netestmatch '??????????*' '1234567890'
|
||
|
netestmatch '*??????????' '1234567890'
|
||
|
netestmatch '*?*?*?*?*?*?*?*?*?*?*' '12345678901'
|
||
|
netestmatch '??????????*' '12345678901'
|
||
|
netestmatch '*??????????' '12345678901'
|
||
|
netestmatch '[x]' 'x'
|
||
|
netestmatch '[*]' '*'
|
||
|
netestmatch '[?]' '?'
|
||
|
netestmatch '[' '['
|
||
|
netestmatch '[[]' '['
|
||
|
netestnomatch '[[]' 'x'
|
||
|
netestnomatch '[*]' ''
|
||
|
netestnomatch '[*]' 'x'
|
||
|
netestnomatch '[?]' 'x'
|
||
|
netestmatch '*[*]*' 'foo*foo'
|
||
|
netestnomatch '*[*]*' 'foo'
|
||
|
netestmatch '[0-9]' '0'
|
||
|
netestmatch '[0-9]' '5'
|
||
|
netestmatch '[0-9]' '9'
|
||
|
netestnomatch '[0-9]' '/'
|
||
|
netestnomatch '[0-9]' ':'
|
||
|
netestnomatch '[0-9]' '*'
|
||
|
netestnomatch '[!0-9]' '0'
|
||
|
netestnomatch '[!0-9]' '5'
|
||
|
netestnomatch '[!0-9]' '9'
|
||
|
netestmatch '[!0-9]' '/'
|
||
|
netestmatch '[!0-9]' ':'
|
||
|
netestmatch '[!0-9]' '*'
|
||
|
netestmatch '*[0-9]' 'a0'
|
||
|
netestmatch '*[0-9]' 'a5'
|
||
|
netestmatch '*[0-9]' 'a9'
|
||
|
netestnomatch '*[0-9]' 'a/'
|
||
|
netestnomatch '*[0-9]' 'a:'
|
||
|
netestnomatch '*[0-9]' 'a*'
|
||
|
netestnomatch '*[!0-9]' 'a0'
|
||
|
netestnomatch '*[!0-9]' 'a5'
|
||
|
netestnomatch '*[!0-9]' 'a9'
|
||
|
netestmatch '*[!0-9]' 'a/'
|
||
|
netestmatch '*[!0-9]' 'a:'
|
||
|
netestmatch '*[!0-9]' 'a*'
|
||
|
netestmatch '*[0-9]' 'a00'
|
||
|
netestmatch '*[0-9]' 'a55'
|
||
|
netestmatch '*[0-9]' 'a99'
|
||
|
netestmatch '*[0-9]' 'a0a0'
|
||
|
netestmatch '*[0-9]' 'a5a5'
|
||
|
netestmatch '*[0-9]' 'a9a9'
|
||
|
netestmatch '\*' '\*'
|
||
|
netestmatch '\?' '\?'
|
||
|
netestmatch '\' '\'
|
||
|
netestnomatch '\\' '\'
|
||
|
netestmatch '\\' '\\'
|
||
|
netestmatch '*\*' 'foo\foo'
|
||
|
netestnomatch '*\*' 'foo'
|
||
|
netestmatch '.*' '.'
|
||
|
netestmatch '.*' '..'
|
||
|
netestmatch '.*' '.a'
|
||
|
netestmatch 'a*' 'a.'
|
||
|
[ -z "$failures" ]
|