[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#26889: Tests for emacs-clojure-mode
From: |
Arun Isaac |
Subject: |
bug#26889: Tests for emacs-clojure-mode |
Date: |
Sat, 13 May 2017 10:38:22 +0530 |
Here is another patch set with the suggested changes incorporated.
>From 8947eda0984e3d444b0960e37e92ac622fc9ac9a Mon Sep 17 00:00:00 2001
From: Arun Isaac <address@hidden>
Date: Thu, 11 May 2017 23:23:30 +0530
Subject: [PATCH 1/4] gnu: Add emacs-ansi.
* gnu/packages/emacs.scm (emacs-ansi): New variable.
---
gnu/packages/emacs.scm | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index 21120b331..cab7f8cf8 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -4639,3 +4639,30 @@ addition of surrounding pairs, such as parantheses and
quotes, in evil mode.")
comment out lines of code in evil mode. It provides @code{gcc} to comment out
lines, and @code{gc} to comment out the target of a motion.")
(license license:gpl3+)))
+
+;; Tests for emacs-ansi have a circular dependency with ert-runner, and
+;; therefore cannot be run
+(define-public emacs-ansi
+ (package
+ (name "emacs-ansi")
+ (version "0.4.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/rejeep/ansi.el/archive/v"
+ version ".tar.gz"))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "13jj4vbi98j3p17hs99bmy7g21jd5h4v3wpxk4pkvhylm3bfwjw8"))))
+ (build-system emacs-build-system)
+ (propagated-inputs
+ `(("emacs-dash" ,emacs-dash)
+ ("emacs-s" ,emacs-s)))
+ (home-page "https://github.com/rejeep/ansi.el")
+ (synopsis "Convert strings to ANSI")
+ (description "@code{emacs-ansi} defines functions that turns simple
+strings to ANSI strings. Turning a string into an ANSI string can be to add
+color to a text, add color in the background of a text or adding a style, such
+as bold, underscore or italic.")
+ (license license:gpl3+)))
--
2.12.2
>From 60c83587fbccc3ca096f21772c560642c6265678 Mon Sep 17 00:00:00 2001
From: Arun Isaac <address@hidden>
Date: Thu, 11 May 2017 23:24:43 +0530
Subject: [PATCH 2/4] gnu: Add emacs-commander.
* gnu/packages/emacs.scm (emacs-commander): New variable.
---
gnu/packages/emacs.scm | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index cab7f8cf8..b1896fdba 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -4666,3 +4666,29 @@ strings to ANSI strings. Turning a string into an ANSI
string can be to add
color to a text, add color in the background of a text or adding a style, such
as bold, underscore or italic.")
(license license:gpl3+)))
+
+;; Tests for emacs-commander have a circular dependency with ert-runner, and
+;; therefore cannot be run
+(define-public emacs-commander
+ (package
+ (name "emacs-commander")
+ (version "0.7.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/rejeep/commander.el/archive/v"
+ version ".tar.gz"))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "196s2i15z7gwxa97l1wkxvjnfmj5n38wwm6d3g4zz15l2vqggc2y"))))
+ (build-system emacs-build-system)
+ (propagated-inputs
+ `(("emacs-dash" ,emacs-dash)
+ ("emacs-f" ,emacs-f)
+ ("emacs-s" ,emacs-s)))
+ (home-page "https://github.com/rejeep/commander.el")
+ (synopsis "Emacs command line parser")
+ (description "@code{emacs-commander} provides command line parsing for
+Emacs.")
+ (license license:gpl3+)))
--
2.12.2
>From b4fa1ebbae2b414139fbdfb3bb44439ae6bfdb0c Mon Sep 17 00:00:00 2001
From: Arun Isaac <address@hidden>
Date: Thu, 11 May 2017 23:25:27 +0530
Subject: [PATCH 3/4] gnu: Add ert-runner.
* gnu/packages/emacs.scm (ert-runner): New variable.
---
gnu/packages/emacs.scm | 64 +++++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 63 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index b1896fdba..a9dd3db6c 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -92,7 +92,8 @@
#:use-module (gnu packages gd)
#:use-module (gnu packages fontutils)
#:use-module (guix utils)
- #:use-module (srfi srfi-1))
+ #:use-module (srfi srfi-1)
+ #:use-module (ice-9 match))
(define-public emacs
(package
@@ -4692,3 +4693,64 @@ as bold, underscore or italic.")
(description "@code{emacs-commander} provides command line parsing for
Emacs.")
(license license:gpl3+)))
+
+;; Tests for ert-runner have a circular dependency with ecukes, and therefore
+;; cannot be run
+(define-public ert-runner
+ (let ((dependencies
+ `(("emacs-ansi" ,emacs-ansi)
+ ("emacs-commander" ,emacs-commander)
+ ("emacs-dash" ,emacs-dash)
+ ("emacs-f" ,emacs-f)
+ ("emacs-s" ,emacs-s)
+ ("emacs-shut-up" ,emacs-shut-up))))
+ (package
+ (name "ert-runner")
+ (version "0.7.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append
"https://github.com/rejeep/ert-runner.el/archive/v"
+ version ".tar.gz"))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "1657nck9i96a4xgl8crfqq0s8gflzp21pkkzwg6m3z5npjxklgwp"))))
+ (build-system emacs-build-system)
+ (inputs dependencies)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'install 'install-executable
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (substitute* "bin/ert-runner"
+ (("ERT_RUNNER=\"\\$\\(dirname \\$\\(dirname \\$0\\)\\)")
+ (string-append "ERT_RUNNER=\"" out
+ "/share/emacs/site-lisp/guix.d/"
+ ,name "-" ,version)))
+ (install-file "bin/ert-runner" (string-append out "/bin"))
+ (wrap-program (string-append out "/bin/ert-runner")
+ (list "EMACSLOADPATH" ":" '=
+ (append
+ ,(match dependencies
+ (((labels packages) ...)
+ `(map (lambda (label package version)
+ (string-append (assoc-ref inputs label)
+
"/share/emacs/site-lisp/guix.d/"
+ (string-drop package 6)
+ "-" version))
+ ',labels
+ ',(map package-name packages)
+ ',(map package-version packages))))
+ ;; empty element to include the default load path as
+ ;; determined by emacs' standard initialization
+ ;; procedure
+ (list ""))))
+ #t))))))
+ (home-page "https://github.com/rejeep/ert-runner.el")
+ (synopsis "Opinionated Ert testing workflow")
+ (description "@code{ert-runner} is a tool for Emacs projects tested
+using ERT. It assumes a certain test structure setup and can therefore make
+running tests easier.")
+ (license license:gpl3+))))
--
2.12.2
>From 8dc79fafe9e3de005a44524b2ad918ca13f75732 Mon Sep 17 00:00:00 2001
From: Arun Isaac <address@hidden>
Date: Thu, 11 May 2017 23:28:53 +0530
Subject: [PATCH 4/4] gnu: emacs-clojure-mode: Enable tests.
* gnu/packages/emacs.scm (emacs-clojure-mode)[arguments]: Add 'check' phase.
[native-inputs]: Add emacs-dash, emacs-s and ert-runner.
---
gnu/packages/emacs.scm | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index a9dd3db6c..4f5988b75 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -2876,6 +2876,16 @@ S-expression.")
(base32
"117mvjqh4nm8mvmwmmvy4qmkdg23ldlzk08y91g8b8ac8kxwqg81"))))
(build-system emacs-build-system)
+ (native-inputs
+ `(("emacs-dash" ,emacs-dash)
+ ("emacs-s" ,emacs-s)
+ ("ert-runner" ,ert-runner)))
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'install 'check
+ (lambda* (#:key inputs #:allow-other-keys)
+ (zero? (system* "ert-runner")))))))
(home-page "https://github.com/clojure-emacs/clojure-mode")
(synopsis "Major mode for Clojure code")
(description
--
2.12.2