|
|
@ -1,64 +1,64 @@
|
|
|
|
- name: "Find exact name file in root dir"
|
|
|
|
- name: "Find exact name file in root dir"
|
|
|
|
assert:
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
that:
|
|
|
|
- q("fileglob", "hello.py") | length == 1
|
|
|
|
- q("fileglob", "hello.py") | length == 1
|
|
|
|
|
|
|
|
|
|
|
|
- name: "All .md file in dir"
|
|
|
|
- name: "All .md file in dir"
|
|
|
|
assert:
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
that:
|
|
|
|
- q("fileglob", "toto/*.md") | length == 3
|
|
|
|
- q("fileglob", "toto/*.md") | length == 3
|
|
|
|
|
|
|
|
|
|
|
|
- name: "All .md files in first level dir"
|
|
|
|
- name: "All .md files in first level dir"
|
|
|
|
assert:
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
that:
|
|
|
|
- q("fileglob", "*/*.md") | length == 4
|
|
|
|
- q("fileglob", "*/*.md") | length == 4
|
|
|
|
|
|
|
|
|
|
|
|
- name: "All .md files"
|
|
|
|
- name: "All .md files"
|
|
|
|
assert:
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
that:
|
|
|
|
- q("fileglob", "**/*.md") | length == 5
|
|
|
|
- q("fileglob", "**/*.md") | length == 5
|
|
|
|
|
|
|
|
|
|
|
|
- name: "Find file outside « files » dir"
|
|
|
|
- name: "Find file outside « files » dir"
|
|
|
|
assert:
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
that:
|
|
|
|
- q("fileglob", "not_files_dir/coucou.*") | length == 3
|
|
|
|
- q("fileglob", "not_files_dir/coucou.*") | length == 3
|
|
|
|
|
|
|
|
|
|
|
|
- name: "Find file outside « role » dir"
|
|
|
|
- name: "Find file outside « role » dir"
|
|
|
|
assert:
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
that:
|
|
|
|
- q("fileglob", "outside_role/*") | length == 5
|
|
|
|
- q("fileglob", "outside_role/*") | length == 5
|
|
|
|
|
|
|
|
|
|
|
|
- name: "Find all .py file in recursive dir"
|
|
|
|
- name: "Find all .py file in recursive dir"
|
|
|
|
assert:
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
that:
|
|
|
|
- q("fileglob", "**/*.py") | length == 9
|
|
|
|
- q("fileglob", "**/*.py") | length == 9
|
|
|
|
|
|
|
|
|
|
|
|
- name: "Find all .py with same name in recursive dir"
|
|
|
|
- name: "Find all .py with same name in recursive dir"
|
|
|
|
assert:
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
that:
|
|
|
|
- q("fileglob", "**/bar.py") | length == 5
|
|
|
|
- q("fileglob", "**/baar.py") | length == 5
|
|
|
|
|
|
|
|
|
|
|
|
- name: "Find all file in recursive dir"
|
|
|
|
- name: "Find all file in recursive dir"
|
|
|
|
assert:
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
that:
|
|
|
|
- q("fileglob", "**/*") | length == 14
|
|
|
|
- q("fileglob", "**/*") | length == 14
|
|
|
|
|
|
|
|
|
|
|
|
- name: "Find all .py file in dir with « 2 », « 3 » or « 23 » in endname"
|
|
|
|
- name: "Find all .py file in dir with « 2 », « 3 » or « 23 » in endname"
|
|
|
|
assert:
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
that:
|
|
|
|
- q("fileglob", "foo/*[23]/*.py") | length == 3
|
|
|
|
- q("fileglob", "foo/*[23]/*.py") | length == 3
|
|
|
|
|
|
|
|
|
|
|
|
- name: "Find all .py file in dir without « 2 », « 3 » or « 23 » in endname"
|
|
|
|
- name: "Find all .py file in dir without « 2 », « 3 » or « 23 » in endname"
|
|
|
|
assert:
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
that:
|
|
|
|
- q("fileglob", "foo/*[!23]/*.py") | length == 2
|
|
|
|
- q("fileglob", "foo/*[!23]/*.py") | length == 2
|
|
|
|
|
|
|
|
|
|
|
|
- name: "Find file with matches any single character"
|
|
|
|
- name: "Find file with matches any single character"
|
|
|
|
assert:
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
that:
|
|
|
|
- q("fileglob", "outside_role/t?t?.txt") | length == 3
|
|
|
|
- q("fileglob", "outside_role/t?t?.txt") | length == 3
|
|
|
|
|
|
|
|
|
|
|
|
- name: "Find file with matches any single character in recursive dir"
|
|
|
|
- name: "Find file with matches any single character in recursive dir"
|
|
|
|
assert:
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
that:
|
|
|
|
- q("fileglob", "**/b?r.py") | length == 6
|
|
|
|
- q("fileglob", "**/b?ar.py") | length == 6
|
|
|
|