test: regex_ testcases (#54972)

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
Abhijeet Kasurde 2019-04-10 08:04:55 +05:30 committed by GitHub
parent 3d9a9ec73f
commit a62adaefa9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 6 deletions

View file

@ -56,6 +56,7 @@ TODO: realpath follows symlinks. There isn't a test for this just now.
TODO: add tests for set theory operations like union
TODO: add tests for regex, match, and search
regex_replace = bar
regex_search = 0001
regex_findall = "['car', 'tar', 'bar']"
regex_escape = \^f\.\*o\(\.\*\)\$

View file

@ -50,6 +50,7 @@ TODO: realpath follows symlinks. There isn't a test for this just now.
TODO: add tests for set theory operations like union
TODO: add tests for regex, match, and search
regex_replace = {{ 'foo' | regex_replace('^foo', 'bar') }}
regex_search = {{ 'test_value_0001' | regex_search('([0-9]+)$')}}
regex_findall = "{{ 'car\ntar\nfoo\nbar\n' | regex_findall('^.ar$', multiline=True) }}"
regex_escape = {{ '^f.*o(.*)$' | regex_escape() }}