We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bb11e0b commit b8f980dCopy full SHA for b8f980d
boreal-py/tests/test_scanner.py
@@ -1015,12 +1015,16 @@ def test_set_params():
1015
# parameters are properly tested in the boreal crate.
1016
rules.set_params(
1017
use_mmap=True,
1018
- string_max_nb_matches=100,
+ string_max_nb_matches=1,
1019
fragmented_scan_mode="fast",
1020
process_memory=False,
1021
max_fetched_region_size=100,
1022
memory_chunk_size=23,
1023
)
1024
+ # Check string_max_nb_matches to ensure parameters are properly set.
1025
+ results = rules.match(data="abc abc")
1026
+ s = results[0].strings[0]
1027
+ assert len(s.instances) == 1
1028
1029
with tempfile.NamedTemporaryFile() as fp:
1030
fp.write(b'dcabc <3>')
0 commit comments