Add: easier to run tests

This commit is contained in:
João Távora 2012-11-06 13:27:37 +00:00
parent 38db5aa9fb
commit 1774d7cbd0
2 changed files with 14 additions and 0 deletions

View File

@ -9,6 +9,11 @@ end
find_version find_version
FileUtils.mkdir_p('pkg') FileUtils.mkdir_p('pkg')
desc "run tests in batch mode"
task :tests do
$EMACS=ENV["EMACS"] || "emacs"
sh "#{$EMACS} -Q -L . -l yasnippet-tests.el -nw --batch -e yas/ert"
end
desc "convert some textmate bundles to yasnippets" desc "convert some textmate bundles to yasnippets"
task :convert_bundles do task :convert_bundles do

View File

@ -455,6 +455,15 @@ TODO: be meaner"
;;; Helpers ;;; Helpers
;;; ;;;
(defun yas/ert ()
(interactive)
(with-temp-buffer
(flet ((message (&rest args)
(declare (ignore args))
nil))
(ert t (buffer-name (current-buffer)))
(princ (buffer-string)))))
(defun yas-should-expand (keys-and-expansions) (defun yas-should-expand (keys-and-expansions)
(dolist (key-and-expansion keys-and-expansions) (dolist (key-and-expansion keys-and-expansions)