]> source.dussan.org Git - rspamd.git/commitdiff
[Test] Add tests for mime_types 2731/head
authorAlexander Moisseev <moiseev@mezonplus.ru>
Fri, 25 Jan 2019 08:00:59 +0000 (11:00 +0300)
committerAlexander Moisseev <moiseev@mezonplus.ru>
Fri, 25 Jan 2019 08:00:59 +0000 (11:00 +0300)
test/functional/cases/105_mimetypes.robot
test/functional/messages/next2last-digits_in_brackets.eml [new file with mode: 0644]
test/functional/messages/next2last-digits_in_parens.eml [new file with mode: 0644]

index 49c5ffc67eeb16eae480498e33b98a2589be9f29..54a9cb4bbb96acd72a247a24bd40849f7e91c3e4 100644 (file)
@@ -33,6 +33,16 @@ Dotted file name is followed by Bad Extension
   Check Rspamc  ${result}  MIME_BAD_EXTENSION \\(\\d+\\.\\d+\\)\\[exe\\]\\n  re=1
   Should Not Contain  ${result.stdout}  MIME_DOUBLE_BAD_EXTENSION
 
+Dotted numbers in parentheses is followed by Bad Extension
+  ${result} =  Scan Message With Rspamc  ${TESTDIR}/messages/next2last-digits_in_parens.eml
+  Check Rspamc  ${result}  MIME_BAD_EXTENSION \\(\\d+\\.\\d+\\)\\[msi\\]\\n  re=1
+  Should Not Contain  ${result.stdout}  MIME_DOUBLE_BAD_EXTENSION
+
+Dotted numbers in square brackets is followed by Bad Extension
+  ${result} =  Scan Message With Rspamc  ${TESTDIR}/messages/next2last-digits_in_brackets.eml
+  Check Rspamc  ${result}  MIME_BAD_EXTENSION \\(\\d+\\.\\d+\\)\\[msi\\]\\n  re=1
+  Should Not Contain  ${result.stdout}  MIME_DOUBLE_BAD_EXTENSION
+
 Rar4
   ${result} =  Scan Message With Rspamc  ${TESTDIR}/messages/rar4.eml
   Check Rspamc  ${result}  MIME_BAD_EXTENSION \\(\\d+\\.\\d+\\)\\[exe\\]\\n  re=1
diff --git a/test/functional/messages/next2last-digits_in_brackets.eml b/test/functional/messages/next2last-digits_in_brackets.eml
new file mode 100644 (file)
index 0000000..9f27832
--- /dev/null
@@ -0,0 +1,9 @@
+Content-Type: multipart/mixed; boundary="------------D6BBFC1853527FEEDD26DC71"
+
+--------------D6BBFC1853527FEEDD26DC71
+Content-Type: application/x-msi; name="PDF417(3.2.4).msi"
+Content-Transfer-Encoding: base64
+Content-Disposition: attachment; filename="PDF417(3.2.4).msi"
+
+MAo=
+--------------D6BBFC1853527FEEDD26DC71--
diff --git a/test/functional/messages/next2last-digits_in_parens.eml b/test/functional/messages/next2last-digits_in_parens.eml
new file mode 100644 (file)
index 0000000..efa90fa
--- /dev/null
@@ -0,0 +1,9 @@
+Content-Type: multipart/mixed; boundary="------------D6BBFC1853527FEEDD26DC71"
+
+--------------D6BBFC1853527FEEDD26DC71
+Content-Type: application/x-msi; name="PDF417(3.2.4).msi"
+Content-Transfer-Encoding: base64
+Content-Disposition: attachment; filename="PDF417[3.2.4].msi"
+
+MAo=
+--------------D6BBFC1853527FEEDD26DC71--