mirror of
https://github.com/zeek/zeek.git
synced 2025-10-15 21:18:20 +00:00
Merge remote-tracking branch 'origin/topic/awelzel/4084-vector-of-pattern-compare'
* origin/topic/awelzel/4084-vector-of-pattern-compare: ZAM/relexpr-op NE for patterns Expr: Fix folding of pattern values to support == and !=
This commit is contained in:
commit
33eaa5ccda
7 changed files with 35 additions and 7 deletions
|
@ -84,3 +84,5 @@ negative index (PASS)
|
|||
negative index (PASS)
|
||||
+= of empty vector (PASS)
|
||||
+= of empty vector (PASS)
|
||||
pv1 == pv2 -> [T, F] (PASS)
|
||||
pv1 != pv2 -> [F, T] (PASS)
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
|
||||
1248 valid, 1890 tested, 437 skipped
|
||||
1255 valid, 1908 tested, 440 skipped
|
||||
|
|
|
@ -241,4 +241,11 @@ event zeek_init()
|
|||
v26 += vector();
|
||||
test_case( "+= of empty vector", |v26| == 0 );
|
||||
|
||||
# Pattern vectors
|
||||
local pv1 = vector(/a/, /b/);
|
||||
local pv2 = vector(/a/, /c/);
|
||||
local pv_eq = pv1 == pv2;
|
||||
local pv_ne = pv1 != pv2;
|
||||
test_case( fmt("pv1 == pv2 -> %s", pv_eq), (pv_eq[0] == T) && (pv_eq[1] == F) );
|
||||
test_case( fmt("pv1 != pv2 -> %s", pv_ne), (pv_ne[0] == F) && (pv_ne[1] == T) );
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue