]> code.delx.au - gnu-emacs-elpa/commitdiff
Try travis
authorrocky <rocky@gnu.org>
Thu, 13 Jun 2013 07:08:14 +0000 (03:08 -0400)
committerrocky <rocky@gnu.org>
Thu, 13 Jun 2013 07:08:14 +0000 (03:08 -0400)
.gitignore
.travis.yml [new file with mode: 0644]
README.md
autogen.sh

index f37d4a23f6814c9f097c22126be68b8e726dda25..0b383019f10a10997bc798ddfd622ba2ea3d67df 100644 (file)
@@ -11,3 +11,4 @@
 /install-sh
 /missing
 /script
+/README
diff --git a/.travis.yml b/.travis.yml
new file mode 100644 (file)
index 0000000..62e90c9
--- /dev/null
@@ -0,0 +1,8 @@
+language: emacs
+
+install: make get-deps
+  # Install emacs.
+  - "sudo apt-get install emacs-23-lucid"
+
+# run the tests
+script: /bin/sh ./autogen.sh && make check
index 8e996945566fdfe990ba785fcd4c2c2e020de265..687af55c9ff3794b14387825784f378ae92b5dbe 100644 (file)
--- a/README.md
+++ b/README.md
@@ -1,3 +1,5 @@
+[![Build Status](https://travis-ci.org/rocky/emacs-test-simple.png)](https://travis-ci.org/rocky/[emacs-test-simple])
+
 *test-simple.el* is :
 
 * Simple -- no need for context macros, enclosing specifications, or required test tags. But if you want, you still can add custom assert failure messages or add notes before a group of tests.
@@ -14,39 +16,39 @@ In file `gcd.el`:
     (defun gcd(a b)
       "Greatest Common Divisor of A and B"
       ;; Make a < b
-      (if (> a b) 
+      (if (> a b)
           (let ((c a))
        (setq a b)
        (setq b c)))
-      (cond 
+      (cond
        ((< a 0) nil)
        ((or (= 0 (- b a)) (= a 1)) a)
        (t (gcd (- b a) a))
        )
     )
-     
+
 
 In file `test-gcd.el` in the same directory:
 
     (require 'test-simple)
     (test-simple-start) ;; Zero counters and start the stop watch.
-    
+
     ;; Use (load-file) below because we want to always to read the source.
     ;; Also, we don't want no stinking compiled source.
-    (assert-t (load-file "./gcd.el") 
+    (assert-t (load-file "./gcd.el")
          "Can't load gcd.el - are you in the right directory?" )
-    
+
     (note "degenerate cases")
-    
+
     (assert-nil (gcd 5 -1) "using positive numbers")
     (assert-nil (gcd -4 1) "using positive numbers, switched order")
-    (assert-raises error (gcd "a" 32) 
+    (assert-raises error (gcd "a" 32)
               "Passing a string value should raise an error")
-    
+
     (note "GCD computations")
     (assert-equal 1 (gcd 3 5) "gcd(3,5)")
     (assert-equal 8 (gcd 8 32) "gcd(8,32)")
-    
+
     (end-tests) ;; Stop the clock and print a summary
 
 Edit (with Emacs of course) `test-gcd.el` and run `M-x eval-current-buffer`
index 68b74ef06464b338708452eb747e57d43f6d3a14..2b57b1a4b5a5a947747b2a5c5ea90c6eecc505e3 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
+cp README.md README
 autoreconf -vfi && \
 autoconf && {
   echo "Running configure with --enable-maintainer-mode $@"
   ./configure --enable-maintainer-mode $@
 }
-