Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add el-spec as submodule

  • Loading branch information...
commit 19dc4d8924a2974f0f516b359480c54b441d9f17 1 parent 06d106d
@uk-ar authored
View
6 .gitmodules
@@ -0,0 +1,6 @@
+[submodule "lib/el-spec"]
+ path = lib/el-spec
+ url = git://github.com/uk-ar/el-spec.git
+[submodule "lib/ert"]
+ path = lib/ert
+ url = git://github.com/ohler/ert.git
View
14 .travis.yml
@@ -0,0 +1,14 @@
+language: emacs-lisp
+before_install:
+ - git submodule update --init
+ - if [ "$EMACS" = 'emacs-snapshot' ]; then
+ sudo add-apt-repository -y ppa:cassou/emacs &&
+ sudo apt-get update -qq &&
+ sudo apt-get install -qq
+ emacs-snapshot-el emacs-snapshot-gtk emacs-snapshot;
+ fi
+env:
+ - EMACS=emacs
+ - EMACS=emacs-snapshot
+script:
+ make travis-ci EMACS=$EMACS
View
5 Makefile
@@ -0,0 +1,5 @@
+EMACS=emacs
+
+travis-ci:
+ ${EMACS} --version
+ ${EMACS} -batch -Q -l test/run-test.el
1  lib/el-spec
@@ -0,0 +1 @@
+Subproject commit 3643966a25f7ff03487ab5c8f4745cf0c10cfa1b
1  lib/ert
@@ -0,0 +1 @@
+Subproject commit fb3c278d3c8ddc6a558779d2c5262acc7cea4204
View
42 test/run-test.el
@@ -0,0 +1,42 @@
+;; Usage:
+;;
+;; emacs -Q -l tests/run-test.el # interactive mode
+;; emacs -batch -Q -l tests/run-test.el # batch mode
+
+
+;; Utils
+(defun key-combo-test-join-path (path &rest rest)
+ "Join a list of PATHS with appropriate separator (such as /).
+
+\(fn &rest paths)"
+ (if rest
+ (concat (file-name-as-directory path) (apply 'key-combo-test-join-path rest))
+ path))
+
+(defvar key-combo-test-dir (file-name-directory load-file-name))
+(defvar key-combo-root-dir (concat key-combo-test-dir ".."))
+
+
+;; Setup `load-path'
+(mapc (lambda (p) (add-to-list 'load-path p))
+ (list key-combo-test-dir
+ key-combo-root-dir))
+
+
+;; Use ERT from github when this Emacs does not have it
+(unless (locate-library "ert")
+ (add-to-list
+ 'load-path
+ (key-combo-test-join-path key-combo-root-dir "lib" "ert" "lisp" "emacs-lisp"))
+ (require 'ert-batch)
+ (require 'ert-ui))
+
+
+;; Load tests
+(load "key-combo-test")
+
+
+;; Run tests
+(if noninteractive
+ (ert-run-tests-batch-and-exit)
+ (ert t))
Please sign in to comment.
Something went wrong with that request. Please try again.