Test the extract filter without the map filter.
map + extract is the usual way to use it but map isn't available on older versions of jinja2 that we still work with. Test extract even on those versions.
This commit is contained in:
parent
e2bd71ac02
commit
32fbd4ba24
1 changed files with 7 additions and 0 deletions
|
@ -95,6 +95,13 @@
|
||||||
assert:
|
assert:
|
||||||
that: "{{_.failed}}"
|
that: "{{_.failed}}"
|
||||||
|
|
||||||
|
- name: Test extract
|
||||||
|
assert:
|
||||||
|
that:
|
||||||
|
- '"c" == 2 | extract(["a", "b", "c"])'
|
||||||
|
- '"b" == 1 | extract(["a", "b", "c"])'
|
||||||
|
- '"a" == 0 | extract(["a", "b", "c"])'
|
||||||
|
|
||||||
- name: Container lookups with extract
|
- name: Container lookups with extract
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
|
|
Loading…
Reference in a new issue