Go to the documentation of this file.
18 #include "../suricata-common.h"
20 #include "../detect-engine.h"
22 #include "../detect-transform-pcrexform.h"
24 #include "../util-unittest.h"
30 static int DetectTransformPcrexformParseTest01 (
void)
36 "alert tcp any any <> any 1 pcrexform:\"[\";");
47 static int DetectTransformPcrexformParseTest02 (
void)
53 "alert http any any -> any any (msg:\"HTTP with pcrexform\"; http.request_line; pcrexform:\"[a-zA-Z]+\\s+(.*)\\s+HTTP\"; content:\"/z4d4kWk.jpg\"; sid:1;)");
64 static int DetectTransformPcrexformParseTest03(
void)
70 "alert http any any -> any any (msg:\"HTTP with pcrexform\"; http.request_line; "
71 "pcrexform:\"No-match\"; content:\"/no-match.jpg\"; sid:1;)");
83 UtRegisterTest(
"DetectTransformPcrexformParseTest01", DetectTransformPcrexformParseTest01);
84 UtRegisterTest(
"DetectTransformPcrexformParseTest02", DetectTransformPcrexformParseTest02);
85 UtRegisterTest(
"DetectTransformPcrexformParseTest03", DetectTransformPcrexformParseTest03);
#define FAIL_IF_NULL(expr)
Fail a test if expression evaluates to NULL.
void UtRegisterTest(const char *name, int(*TestFn)(void))
Register unit test.
main detection engine ctx
void DetectEngineCtxFree(DetectEngineCtx *)
Free a DetectEngineCtx::
Signature * DetectEngineAppendSig(DetectEngineCtx *, const char *)
Parse and append a Signature into the Detection Engine Context signature list.
#define FAIL_IF_NOT_NULL(expr)
Fail a test if expression evaluates to non-NULL.
#define PASS
Pass the test.
DetectEngineCtx * DetectEngineCtxInit(void)