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.
 
 
 
 

56 lines
1.3 KiB

  1. #!/usr/bin/env sh
  2. echo
  3. echo Unit Test:
  4. echo
  5. bats --tap test_mw.bats
  6. #modify
  7. if [ -z "$MAILDIR" ] || [ -z "$mwaddr" ]; then
  8. echo "First do:"
  9. [ -z "$MAILDIR" ] && echo "export MAILDIR=..."
  10. [ -z "$mwaddr" ] && echo "export mwaddr=your.email@gmail.com"
  11. exit
  12. fi
  13. echo
  14. echo "Integration tests need working email $mwaddr"
  15. echo "CTRL-C to skip"
  16. cd .. && sudo make install && OK="OK"
  17. if [ "$OK" = "OK" ]; then
  18. echo "Warning: Out with CTRL-C if your mail (config) files are important here."
  19. export mwmaildir=$MAILDIR
  20. export mwname='r n'
  21. export mwlogin=$mwaddr
  22. export mwpass="${mwpass:-mutt-wizard-$mwaddr}"
  23. mwaccmaildir="$mwmaildir/$mwaddr"
  24. rm -rf $mwaccmaildir
  25. [ -f "${PASSWORD_STORE_DIR:-~/.password-store}/$mwpass.gpg" ] || pass insert $mwpass
  26. echo "= Test 1 ="
  27. mwtype=online mw add
  28. echo "=> In another window, start mutt and verify that mails are shown"
  29. echo "=> Then anwer with N"
  30. mw purge
  31. rm -rf $mwaccmaildir
  32. echo "= Test 2 ="
  33. mwtype=offline mw add
  34. mw
  35. echo "=> In another window, start mutt and verify that mails are shown"
  36. echo "=> Press i1, wait, press i2. Verify that mutt is fast again after i2."
  37. echo "=> Press gm and gM, to start mw sync."
  38. echo "=> Anwer with Y and check that mbsyncrc, msmtp/config and mutt/accounts are gone."
  39. mw purge
  40. fi
  41. cd $CD