You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

150_rspamadm.robot 1.4KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. *** Settings ***
  2. Library Process
  3. Library ../lib/rspamd.py
  4. Suite Teardown Terminate All Processes kill=True
  5. *** Test Cases ***
  6. Config Test
  7. ${result} = Run Process ${RSPAMADM} configtest
  8. Should Match Regexp ${result.stderr} ^$
  9. Should Match Regexp ${result.stdout} ^syntax OK$
  10. Should Be Equal As Integers ${result.rc} 0
  11. Config Help
  12. ${result} = Run Process ${RSPAMADM} confighelp
  13. Should Match Regexp ${result.stderr} ^$
  14. Should Be Equal As Integers ${result.rc} 0
  15. Simple interpreter
  16. ${handle} = Start Process ${RSPAMADM} lua
  17. ${result} = Write to stdin ${handle} 1+1
  18. Should Be Equal As Strings ${result} 2\n
  19. Simple interpreter, two results
  20. ${handle} = Start Process ${RSPAMADM} lua
  21. ${result} = Write to stdin ${handle} 1+1, 2 * 5
  22. Should Be Equal ${result} 2\n10\n
  23. Process message callback
  24. ${handle} = Start Process ${RSPAMADM} lua
  25. ${result} = Write to stdin ${handle} .load ${TESTDIR}/lua/rspamadm/test_message_callback.lua\n.message message_callback ${TESTDIR}/messages/empty_part.eml
  26. Should Contain ${result} n parts = 2
  27. Should Contain ${result} 1\n2\n4\n6
  28. Lua batch mode
  29. ${result} = Run Process ${RSPAMADM} lua -b ${TESTDIR}/lua/rspamadm/test_batch.lua
  30. Should Match Regexp ${result.stderr} ^$
  31. Should Be Equal As Integers ${result.rc} 0
  32. Should Be Equal ${result.stdout} hello world