summaryrefslogtreecommitdiffstats
path: root/test/functional/cases/350_magic.robot
blob: e7d7810e8b4f3a36b0d6ff7a6b496de4f2aaaadc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
*** Settings ***
Suite Setup     Magic Setup
Suite Teardown  Simple Teardown
Library         ${TESTDIR}/lib/rspamd.py
Resource        ${TESTDIR}/lib/rspamd.robot
Variables       ${TESTDIR}/lib/vars.py

*** Variables ***
${CONFIG}       ${TESTDIR}/configs/lua_script.conf
${LUA_SCRIPT}   ${TESTDIR}/lua/magic.lua
${RSPAMD_SCOPE}  Suite
${URL_TLD}      ${TESTDIR}/../lua/unit/test_tld.dat

*** Test Cases ***
Magic detections bundle 1
  Scan File  ${TESTDIR}/messages/gargantua.eml
  Expect Symbols  MAGIC_SYM_ZIP_2
  ...  MAGIC_SYM_RAR_3
  ...  MAGIC_SYM_EXE_4
  ...  MAGIC_SYM_ELF_5
  ...  MAGIC_SYM_LNK_6
  ...  MAGIC_SYM_CLASS_7
  ...  MAGIC_SYM_RTF_8
  ...  MAGIC_SYM_PDF_9
  ...  MAGIC_SYM_PS_10
  ...  MAGIC_SYM_CHM_11
  ...  MAGIC_SYM_DJVU_12
  ...  MAGIC_SYM_ARJ_13
  ...  MAGIC_SYM_CAB_14
  ...  MAGIC_SYM_ACE_15
  ...  MAGIC_SYM_TAR_16
  ...  MAGIC_SYM_BZ2_17
  ...  MAGIC_SYM_XZ_18
  ...  MAGIC_SYM_LZ4_19
  ...  MAGIC_SYM_ZST_20
  ...  MAGIC_SYM_DMG_21
  ...  MAGIC_SYM_ISO_22
  ...  MAGIC_SYM_ZOO_23
  ...  MAGIC_SYM_EPUB_24
  ...  MAGIC_SYM_XAR_25
  ...  MAGIC_SYM_PSD_26
  ...  MAGIC_SYM_PCX_27
  ...  MAGIC_SYM_TIFF_28
  ...  MAGIC_SYM_ICO_29
  ...  MAGIC_SYM_SWF_30
  ...  MAGIC_SYM_DOC_31
  ...  MAGIC_SYM_XLS_32
  ...  MAGIC_SYM_PPT_33
  ...  MAGIC_SYM_MSI_34
  ...  MAGIC_SYM_MSG_35
  ...  MAGIC_SYM_DOCX_36
  ...  MAGIC_SYM_XLSX_37
  ...  MAGIC_SYM_PPTX_38
  ...  MAGIC_SYM_ODT_39
  ...  MAGIC_SYM_ODS_40
  ...  MAGIC_SYM_ODP_41
  ...  MAGIC_SYM_7Z_42
  ...  MAGIC_SYM_VSD_43
  ...  MAGIC_SYM_PNG_44
  ...  MAGIC_SYM_JPG_45
  ...  MAGIC_SYM_GIF_46
  ...  MAGIC_SYM_BMP_47
  ...  MAGIC_SYM_TXT_48
  ...  MAGIC_SYM_HTML_49
  ...  MAGIC_SYM_CSV_50
  ...  MAGIC_SYM_DWG_51
  ...  MAGIC_SYM_JAR_52
  ...  MAGIC_SYM_APK_53
  ...  MAGIC_SYM_BAT_54
  ...  MAGIC_SYM_ICS_55
  ...  MAGIC_SYM_VCF_56

*** Keywords ***
Magic Setup
  New Setup  LUA_SCRIPT=${LUA_SCRIPT}