From: Victor Julien Date: Fri, 14 Apr 2023 12:17:53 +0000 (+0200) Subject: detect/content: add negated endswith test X-Git-Tag: suricata-7.0.0-rc2~426 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a42c225117e7cf815b35b43a4287401817d08f38;p=thirdparty%2Fsuricata.git detect/content: add negated endswith test --- diff --git a/src/tests/detect-engine-content-inspection.c b/src/tests/detect-engine-content-inspection.c index 43cf0b805e..ee1b605f2c 100644 --- a/src/tests/detect-engine-content-inspection.c +++ b/src/tests/detect-engine-content-inspection.c @@ -255,6 +255,8 @@ static int DetectEngineContentInspectionTest12(void) { TEST_RUN("abcXYZ", 6, "content:\"abc\"; content:\"XYZ\"; distance:0; within:3; endswith;", true, 2); TEST_RUN("abcXYZ", 6, "content:\"XYZ\"; distance:3; within:3; endswith;", true, 1); TEST_RUN("abcXYZ", 6, "content:\"cXY\"; distance:2; within:3; endswith;", false, 1); + TEST_RUN("abcXYZ", 6, "content:!\"cXY\"; endswith;", true, 1); + TEST_RUN("abcXYZ", 6, "content:!\"XYZ\"; endswith;", false, 1); TEST_RUN("xxxxxxxxxxxxxxxxxyYYYYYYYYYYYYYYYY", 34, "content:\"yYYYYYYYYYYYYYYYY\"; distance:9; within:29; endswith;", true, 1); TEST_FOOTER;