From 30cb77742dec629f97e038c402ba2f7a464d3a08 Mon Sep 17 00:00:00 2001 From: zhengchao Date: Tue, 11 Dec 2018 19:58:02 +0600 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0Maat=5Fcmd=5Fkey=5Fselect?= =?UTF-8?q?=E7=9A=84=E6=B5=8B=E8=AF=95=E7=94=A8=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/entry/Maat_rule.cpp | 2 +- test/test_maatframe.cpp | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/entry/Maat_rule.cpp b/src/entry/Maat_rule.cpp index 3b45de4..988184b 100644 --- a/src/entry/Maat_rule.cpp +++ b/src/entry/Maat_rule.cpp @@ -32,7 +32,7 @@ #include "stream_fuzzy_hash.h" #include "gram_index_engine.h" -int MAAT_FRAME_VERSION_2_5_20181205=1; +int MAAT_FRAME_VERSION_2_5_20181211=1; const char* CHARSET_STRING[]={"NONE","gbk","big5","unicode","utf8","bin", "unicode_ascii_esc","unicode_ascii_aligned","unicode_ncr_dec","unicode_ncr_hex","url_encode_gb2312","url_encode_utf8",""}; diff --git a/test/test_maatframe.cpp b/test/test_maatframe.cpp index 2e67274..51894b5 100644 --- a/test/test_maatframe.cpp +++ b/test/test_maatframe.cpp @@ -1185,7 +1185,11 @@ TEST_F(MaatCmdTest, SetExpr) output_id_cnt=Maat_cmd_select(feather,label_id, output_ids, 4); EXPECT_EQ(output_id_cnt, 2); EXPECT_TRUE(output_ids[0]==config_id||output_ids[0]==config_id-1); - + struct Maat_cmd_key* keys=NULL; + output_id_cnt=Maat_cmd_key_select(feather,label_id, &keys); + EXPECT_TRUE(keys[0].rule_id==config_id||keys[0].rule_id==config_id-1); + + Maat_cmd_key_free(&keys, output_id_cnt); usleep(WAIT_FOR_EFFECTIVE_US);//waiting for commands go into effect del_command(feather, config_id-1); del_command(feather, config_id);