diff --git a/testing/btest/broker/store/handle-copy.zeek b/testing/btest/broker/store/handle-copy.zeek index cdb3b25f4c..d2d8f41e45 100644 --- a/testing/btest/broker/store/handle-copy.zeek +++ b/testing/btest/broker/store/handle-copy.zeek @@ -10,7 +10,7 @@ global result_count = 0; function print_keys(a: opaque of Broker::Store) { - when ( local s = Broker::keys(a) ) + when [a] ( local s = Broker::keys(a) ) { print "keys", s; ++result_count; diff --git a/testing/btest/broker/store/ops.zeek b/testing/btest/broker/store/ops.zeek index 30aa4f284f..6f5ee21cd6 100644 --- a/testing/btest/broker/store/ops.zeek +++ b/testing/btest/broker/store/ops.zeek @@ -12,7 +12,7 @@ global step: count = 0; function print_index(k: any) { - when ( local r = Broker::get(h, k) ) + when [k] ( local r = Broker::get(h, k) ) { step += 1; print fmt("[%d]", step), k, r$status, r$result; @@ -26,7 +26,7 @@ function print_index(k: any) function print_exists(k: any) { - when ( local r = Broker::exists(h, k) ) + when [k] ( local r = Broker::exists(h, k) ) { step += 1; print fmt("[%d]", step), k, r; @@ -40,7 +40,7 @@ function print_exists(k: any) function print_index_from_value(k: any, i: any) { - when ( local r = Broker::get_index_from_value(h, k, i) ) + when [k, i] ( local r = Broker::get_index_from_value(h, k, i) ) { step += 1; print fmt("[%d]", step), k, r$status, r$result; diff --git a/testing/btest/broker/store/sqlite.zeek b/testing/btest/broker/store/sqlite.zeek index b9b1225fce..76fe3fd3a6 100644 --- a/testing/btest/broker/store/sqlite.zeek +++ b/testing/btest/broker/store/sqlite.zeek @@ -12,7 +12,7 @@ global h: opaque of Broker::Store; function print_index(k: any) { - when ( local r = Broker::get(h, k) ) + when [k] ( local r = Broker::get(h, k) ) { print k, r$status, r$result; } diff --git a/testing/btest/language/more-closure-tests.zeek b/testing/btest/language/more-closure-tests.zeek index 2f6d6fbd91..cf0125f259 100644 --- a/testing/btest/language/more-closure-tests.zeek +++ b/testing/btest/language/more-closure-tests.zeek @@ -52,7 +52,7 @@ function die() { local h: addr = 127.0.0.1; - when ( local hname = lookup_addr(h) ) + when [h] ( local hname = lookup_addr(h) ) { print "lookup successful"; terminate(); diff --git a/testing/btest/language/returnwhen.zeek b/testing/btest/language/returnwhen.zeek index 8eddd4a30b..5fe60d44a1 100644 --- a/testing/btest/language/returnwhen.zeek +++ b/testing/btest/language/returnwhen.zeek @@ -43,7 +43,7 @@ event do_another() if ( ! done ) schedule 1sec { set_flag() }; - when ( local result = async_func("from do_another()") ) + when [local_dummy, anon] ( local result = async_func("from do_another()") ) { print "async_func() return result in do_another()", result; print local_dummy("from do_another() when block"); @@ -66,7 +66,7 @@ event zeek_init() schedule 1sec { set_flag() }; - when ( local result = async_func("from zeek_init()") ) + when [local_dummy, anon] ( local result = async_func("from zeek_init()") ) { print "async_func() return result in zeek_init()", result; print local_dummy("from zeek_init() when block"); diff --git a/testing/btest/language/when.zeek b/testing/btest/language/when.zeek index 38367dd8fb..d0d07b44fa 100644 --- a/testing/btest/language/when.zeek +++ b/testing/btest/language/when.zeek @@ -9,7 +9,7 @@ event zeek_init() { local h: addr = 127.0.0.1; - when ( local hname = lookup_addr(h) ) + when [h] ( local hname = lookup_addr(h) ) { print "lookup successful"; terminate(); @@ -21,9 +21,9 @@ event zeek_init() local to = 5sec; # Just checking that timeouts can use arbitrary expressions... - when ( local hname2 = lookup_addr(h) ) {} + when [h] ( local hname2 = lookup_addr(h) ) {} timeout to {} - when ( local hname3 = lookup_addr(h) ) {} + when [h] ( local hname3 = lookup_addr(h) ) {} timeout to + 2sec {} print "done";