mirror of
https://github.com/mandiant/capa.git
synced 2025-12-22 15:16:22 -08:00
updating test for strings with special characaters
This commit is contained in:
@@ -689,14 +689,12 @@ def test_string_values_special_characters():
|
|||||||
name: test rule
|
name: test rule
|
||||||
features:
|
features:
|
||||||
- or:
|
- or:
|
||||||
- string: hello\\r\\nworld
|
- string: "hello\\r\\nworld"
|
||||||
- string: some\\path
|
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
r = capa.rules.Rule.from_yaml(rule)
|
r = capa.rules.Rule.from_yaml(rule)
|
||||||
children = list(r.statement.get_children())
|
children = list(r.statement.get_children())
|
||||||
assert (String("hello\r\nworld") in children) == True
|
assert (String("hello\r\nworld") in children) == True
|
||||||
assert (String("some\\path") in children) == True
|
|
||||||
|
|
||||||
|
|
||||||
def test_regex_values_always_string():
|
def test_regex_values_always_string():
|
||||||
|
|||||||
Reference in New Issue
Block a user