Skip to content

Commit

Permalink
New test setup
Browse files Browse the repository at this point in the history
This new setup is based on src-blocks in an org-file. We can run the
tests in the org-file, or tangle them out to ert-style tests that can
run on Travis (or locally). I am getting rid of the old tests in favor
of this. I hope this encourages me (and others) to write new tests for
ort-ref.
  • Loading branch information
jkitchin committed Jul 18, 2016
1 parent f89ba73 commit 8bf8757
Show file tree
Hide file tree
Showing 16 changed files with 4,130 additions and 1,401 deletions.
16 changes: 14 additions & 2 deletions Makefile
Expand Up @@ -5,6 +5,8 @@ EL_SOURCES = *.el
SOURCES = ${EL_SOURCES}

INIT = test/init.el
INIT-DEVEL = test/init-devel.el

all: test

test: clean
Expand All @@ -14,8 +16,11 @@ unit:
${CASK_EXEC} ${emacs} -Q -batch -L "." -l ${INIT} -l org -l org-ref.el -l test/org-ref-test.el --eval "(ert t)"


mytest:
${CASK_EXEC} ${emacs} -Q -batch -l ${INIT} -l test/org-test-setup.el -l test/org-ref-test.el -f ert-run-tests-batch-and-exit
orgtest:
${CASK_EXEC} ${emacs} -Q -batch -l ${INIT} -l test/org-test-setup.el -l test/org-ert.el -f org-ert-tangle-tests

mytest: orgtest
${CASK_EXEC} ${emacs} -Q -batch -l ${INIT} -l test/org-test-setup.el -l test/*-test.el -f ert-run-tests-batch-and-exit

compile:
${CASK_EXEC} ${emacs} -Q -batch -l ${INIT} -L "." -f batch-byte-compile *.el
Expand Down Expand Up @@ -64,6 +69,13 @@ ivy:
-l ${INIT} \
tests/test-1.org

devel:
${CASK_EXEC} ${emacs} -Q \
--eval="(setq scimax-load-user-dir nil)" \
--eval="(setq org-ref-completion-library 'org-ref-ivy-cite)" \
-l ${INIT} \
-l ${INIT-DEVEL}

vanilla:
${CASK_EXEC} ${emacs} -Q -l ${INIT} tests/test-1.org

Expand Down
1 change: 0 additions & 1 deletion org-ref-core.el
Expand Up @@ -1235,7 +1235,6 @@ A number greater than one means multiple labels!"
:link (format "[[#%s]]" (org-entry-get (point) "CUSTOM_ID"))))

;; and to #+label: lines

(when (and (equal (org-element-type object) 'paragraph)
(org-element-property :name object))
(org-store-link-props
Expand Down

0 comments on commit 8bf8757

Please sign in to comment.