emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/system-packages 04e2f7f 087/117: Make travis run tests


From: Stefan Monnier
Subject: [elpa] externals/system-packages 04e2f7f 087/117: Make travis run tests
Date: Fri, 14 Dec 2018 17:02:14 -0500 (EST)

branch: externals/system-packages
commit 04e2f7fa734dabf755bbede6d29207cc1e6aa2ac
Author: Alex Branham <address@hidden>
Commit: Alex Branham <address@hidden>

    Make travis run tests
---
 .travis.yml                  | 3 ++-
 Makefile                     | 7 ++++++-
 test/system-packages-test.el | 9 +++++----
 3 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index e9e54a2..c7b860b 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -9,5 +9,6 @@ before_install:
 
 script:
   - emacs-snapshot --version
-  - make
+  - make compile
+  - make test
 
diff --git a/Makefile b/Makefile
index 3e5a4a6..9365804 100644
--- a/Makefile
+++ b/Makefile
@@ -8,8 +8,13 @@ ELC := $(patsubst %.el,%.elc,$(EL))
 .PHONY: all
 all: compile
 
-.PHONY: compile
+.PHONY: compile test
 compile: $(ELC)
 
 %.elc: %.el
        $(EMACS_BATCH) --eval "(progn (message (emacs-version)) (setq 
byte-compile-error-on-warn t) (batch-byte-compile))" $<
+
+test:
+       $(EMACS_BATCH) --eval "(progn\
+       (load-file \"test/system-packages-test.el\") \
+       (ert-run-tests-batch-and-exit))"
diff --git a/test/system-packages-test.el b/test/system-packages-test.el
index 26ac4dd..2e98dad 100644
--- a/test/system-packages-test.el
+++ b/test/system-packages-test.el
@@ -5,18 +5,19 @@
 ;; Author: J. Alexander Branham <address@hidden>
 
 (require 'ert)
+(require 'system-packages)
 
 (ert-deftest system-packages-get-install ()
   "Return correct installation command."
   (should (string=
            (let ((system-packages-use-sudo nil)
                  (system-packages-package-manager 'guix))
-             (system-packages--get-command 'install))
+             (system-packages-get-command 'install))
            "guix package -i "))
   (should (string=
            (let ((system-packages-use-sudo t)
                  (system-packages-package-manager 'pacman))
-             (system-packages--get-command 'install))
+             (system-packages-get-command 'install))
            "sudo pacman -S ")))
 
 (ert-deftest system-packages-get-install-noconfirm ()
@@ -25,11 +26,11 @@
            (let ((system-packages-noconfirm t)
                  (system-packages-use-sudo nil)
                  (system-packages-package-manager 'guix))
-             (system-packages--get-command 'install))
+             (system-packages-get-command 'install))
            "guix package -i "))
   (should (string=
            (let ((system-packages-noconfirm t)
                  (system-packages-use-sudo t)
                  (system-packages-package-manager 'pacman))
-             (system-packages--get-command 'install))
+             (system-packages-get-command 'install))
            "sudo pacman -S --noconfirm")))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]