mirror of
https://github.com/openwrt/packages.git
synced 2026-04-15 19:02:09 +00:00
Changelog: https://github.com/cpburnz/python-pathspec/blob/master/CHANGELOG.rst First stable 1.x release with API refinements and bug fixes. Add test.sh to verify gitignore-style pattern matching. Signed-off-by: Alexandru Ardelean <alex@shruggie.ro>
13 lines
387 B
Bash
Executable File
13 lines
387 B
Bash
Executable File
#!/bin/sh
|
|
[ "$1" = python3-pathspec ] || exit 0
|
|
python3 - << 'EOF'
|
|
import pathspec
|
|
assert pathspec.__version__, "pathspec version is empty"
|
|
|
|
spec = pathspec.PathSpec.from_lines("gitwildmatch", ["*.py", "!test_*.py", "build/"])
|
|
assert spec.match_file("foo.py")
|
|
assert not spec.match_file("test_foo.py")
|
|
assert spec.match_file("build/output.txt")
|
|
assert not spec.match_file("foo.txt")
|
|
EOF
|