完善摘要测试用例

This commit is contained in:
zhengchao
2015-11-23 11:39:50 +08:00
parent c1ba19566f
commit 5008b1de81
5 changed files with 13 additions and 4 deletions

BIN
test/digest_test.data Normal file

Binary file not shown.

View File

@@ -180,8 +180,8 @@
"table_name": "FILE_DIGEST", "table_name": "FILE_DIGEST",
"table_type": "digest", "table_type": "digest",
"table_content": { "table_content": {
"raw_len": 46292790, "raw_len": 1160164,
"digest": "5nN+XW1badOlW7Odi6K[7203:46299992]", "digest": "FsOmaK3utZafWYt/i[7203:46299992]",
"cfds_level": 3 "cfds_level": 3
} }
} }

View File

@@ -48,7 +48,7 @@ int main()
// const char* inc_cfg_dir="./rules/inc/index"; // const char* inc_cfg_dir="./rules/inc/index";
const char* log_file="./test.log"; const char* log_file="./test.log";
const char* scan_data="http://www.cyberessays.com/search_results.php?action=search&query=yulingjing,abckkk,1234567"; const char* scan_data="http://www.cyberessays.com/search_results.php?action=search&query=yulingjing,abckkk,1234567";
const char* digest_test_file="./1.data"; const char* digest_test_file="./digest_test.data";
struct stat digest_fstat; struct stat digest_fstat;
unsigned long long read_size=0,scan_offset=0; unsigned long long read_size=0,scan_offset=0;
char digest_test_buff[4096]={0}; char digest_test_buff[4096]={0};

8
test/right_result.txt Normal file
View File

@@ -0,0 +1,8 @@
Load entry id 101 SUCCESS.
hit 1 rules
hit current region,but not hit compile rule.
ipv4 scan hit compile rule id 123.
ipv6 scan hit region.
digest scan hit 127.
digest scan hit 127.
digest scan hit 127.

View File

@@ -1,7 +1,7 @@
#each collumn seperate with '\t' #each collumn seperate with '\t'
#id (0~65535) #id (0~65535)
#name string #name string
#type one of ip,expr,compile or plugin #type one of ip,expr,digest,intval,compile or plugin
#src_charset one of GBK,BIG5,UNICODE,UTF8 #src_charset one of GBK,BIG5,UNICODE,UTF8
#dst_charset combined by GBK,BIG5,UNICODE,UTF8,seperate with '/' #dst_charset combined by GBK,BIG5,UNICODE,UTF8,seperate with '/'
#do_merege yes or no #do_merege yes or no
@@ -13,3 +13,4 @@
4 IP_CONFIG ip GBK GBK no 0 4 IP_CONFIG ip GBK GBK no 0
5 CONTENT_SIZE intval GBK GBK no 0 5 CONTENT_SIZE intval GBK GBK no 0
6 QD_ENTRY_INFO plugin GBK GBK no 0 6 QD_ENTRY_INFO plugin GBK GBK no 0
7 FILE_DIGEST digest GBK GBK no 0