freebsd-skq/bin/sh/tests/builtins/case3.0
Julio Merino 13de33a5dc Migrate tools/regression/bin/ tests to the new layout.
This change is a proof of concept on how to easily integrate existing
tests from the tools/regression/ hierarchy into the /usr/tests/ test
suite and on how to adapt them to the new layout for src.

To achieve these goals, this change:

- Moves tests from tools/regression/bin/<tool>/ to bin/<tool>/tests/.
- Renames the previous regress.sh files to legacy_test.sh.
- Adds Makefiles to build and install the tests and all their supporting
  data files into /usr/tests/bin/.
- Plugs the legacy_test test programs into the test suite using the new
  TAP backend for Kyua (appearing in 0.8) so that the code of the test
  programs does not have to change.
- Registers the new directories in the BSD.test.dist mtree file.

Reviewed by:	freebsd-testing
Approved by:	rpaulo (mentor)
2013-12-11 04:09:17 +00:00

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" ]