dengste / org-caldav

Caldav sync for Emacs orgmode
GNU General Public License v3.0
712 stars 105 forks source link

Testing the plugin #301

Closed ANtlord closed 2 months ago

ANtlord commented 2 months ago

Hello,

It's not really an issue. It's a question. I want to add the support of RRULE, but it's annoying restart Emacs to pick the changes and to run synchronization every time.

I see that there is the file org-caldav-tests.el with the guide at the top. It says

TZ="Europe/Berlin" emacs -Q -L . --eval '(setq org-caldav-url "CALDAV-URL")' -l org-caldav-testsuite.el -f ert

However, I don't want to test everything from the top. I want to test the format only. I found the function org-caldav-import-ics-to-org, which seems what I need to run in order to test the format of the output.

So, my expectation is

Do you know how I can make it?

ANtlord commented 2 months ago

Ok, turns out, I just needed to read the emacs manual closer https://www.gnu.org/software/emacs/manual/html_node/ert/Running-Tests-in-Batch-Mode.html

emacs -batch -l ert -l org-caldav.el -l org-caldav-unittest.el -f ert-run-tests-batch-and-exit

Instead of the file org-caldav-unittest.el you can put your own file name.