[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master e18adb1 25/26: Merge commit '604942d36021a8b14877a0a640234
From: |
Rocky Bernstein |
Subject: |
[elpa] master e18adb1 25/26: Merge commit '604942d36021a8b14877a0a640234a09c79e0927' |
Date: |
Thu, 25 May 2017 02:22:18 -0400 (EDT) |
branch: master
commit e18adb107595e20d5d6301623bf160df7b5d4f01
Merge: 96cf00c 604942d
Author: rocky <address@hidden>
Commit: rocky <address@hidden>
Merge commit '604942d36021a8b14877a0a640234a09c79e0927'
---
packages/test-simple/.gitignore | 1 +
packages/test-simple/.travis.yml | 12 +++++++---
packages/test-simple/Makefile.am | 5 +++--
packages/test-simple/test-simple.el | 35 ++++++++++++++++++++----------
packages/test-simple/test/test-basic.el | 2 +-
packages/test-simple/test/test-fns.el | 8 +++----
packages/test-simple/test/test-no-clear.el | 2 +-
7 files changed, 42 insertions(+), 23 deletions(-)
diff --git a/packages/test-simple/.gitignore b/packages/test-simple/.gitignore
index 0b38301..637d268 100644
--- a/packages/test-simple/.gitignore
+++ b/packages/test-simple/.gitignore
@@ -12,3 +12,4 @@
/missing
/script
/README
+/.cask/
diff --git a/packages/test-simple/.travis.yml b/packages/test-simple/.travis.yml
index 9280a20..743fe94 100644
--- a/packages/test-simple/.travis.yml
+++ b/packages/test-simple/.travis.yml
@@ -1,8 +1,14 @@
language: emacs
-install:
- # Install emacs.
- - "sudo apt-get install emacs23-nox"
+env:
+ - EMACS=emacs24
+install:
+ - if [ "$EMACS" = 'emacs24' ]; then
+ sudo add-apt-repository -y ppa:cassou/emacs &&
+ sudo apt-get -qq update &&
+ sudo apt-get -qq -f install &&
+ sudo apt-get -qq install emacs24 emacs24-el;
+ fi
# run the tests
script: /bin/sh ./autogen.sh && make check
diff --git a/packages/test-simple/Makefile.am b/packages/test-simple/Makefile.am
index abf9c32..4343b3a 100644
--- a/packages/test-simple/Makefile.am
+++ b/packages/test-simple/Makefile.am
@@ -34,14 +34,15 @@ endif
#: Run all tests
test: check
+#: Run all tests with reduced versbosity
check-short:
$(MAKE) -C test check 2>&1 | ruby make-check-filter.rb
-#: Run all tests without and show just the failure lines
+#: Run tests showing only the failure lines; See also check-short
check-terse:
$(MAKE) check 2>&1 | $(RUBY) make-check-filter.rb | grep failure
-#: Run "make install"
+#: Run "make install" with reduced verbosity
install-short:
$(MAKE) install 2>&1 | $(RUBY) make-check-filter.rb
diff --git a/packages/test-simple/test-simple.el
b/packages/test-simple/test-simple.el
index 1914ac0..9fd0e7b 100644
--- a/packages/test-simple/test-simple.el
+++ b/packages/test-simple/test-simple.el
@@ -1,13 +1,13 @@
;;; test-simple.el --- Simple Unit Test Framework for Emacs Lisp -*-
lexical-binding: t -*-
;; Rewritten from Phil Hagelberg's behave.el by rocky
-;; Copyright (C) 2015, 2016 Free Software Foundation, Inc
+;; Copyright (C) 2015, 2016, 2017 Free Software Foundation, Inc
;; Author: Rocky Bernstein <address@hidden>
;; URL: http://github.com/rocky/emacs-test-simple
;; Keywords: unit-test
;; Package-Requires: ((cl-lib "0"))
-;; Version: 1.2.0
+;; Version: 1.3.0
;; This program is free software: you can redistribute it and/or
;; modify it under the terms of the GNU General Public License as
@@ -89,7 +89,13 @@
;;; Code:
-(eval-when-compile (require 'cl-lib))
+;; Press C-x C-e at the end of the next line configure the program in GNU emacs
+;; for building via "make" to get set up.
+;; (compile (format "EMACSLOADPATH=:%s ./autogen.sh" "."))
+;; After that you can run:
+;; (compile "make check")
+
+(require 'cl-lib)
(defgroup test-simple nil
"Simple Unit Test Framework for Emacs Lisp"
@@ -279,13 +285,17 @@ additional message to be displayed."
(interactive)
(unless test-info (setq test-info test-simple-info))
(test-simple-describe-failures test-info)
- (if noninteractive
- (progn
- (switch-to-buffer "*test-simple*")
- (message "%s" (buffer-substring (point-min) (point-max)))
- )
- (switch-to-buffer-other-window "*test-simple*")
- ))
+ (cond (noninteractive
+ (set-buffer "*test-simple*")
+ (cond ((getenv "USE_TAP")
+ (princ (format "%s\n" (buffer-string)))
+ )
+ (t ;; non-TAP goes to stderr (backwards compatibility)
+ (message "%s" (buffer-substring (point-min) (point-max)))
+ )))
+ (t ;; interactive
+ (switch-to-buffer-other-window "*test-simple*")
+ )))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Reporting
@@ -295,8 +305,9 @@ additional message to be displayed."
(switch-to-buffer "*test-simple*")
(let ((inhibit-read-only t))
(insert msg)
- (if newline (insert "\n")))
- (switch-to-buffer nil))
+ (if newline (insert "\n"))
+ (switch-to-buffer nil)
+ ))
(defun test-simple--ok-msg (fail-message &optional test-info)
(unless test-info (setq test-info test-simple-info))
diff --git a/packages/test-simple/test/test-basic.el
b/packages/test-simple/test/test-basic.el
index 723779a..be14140 100644
--- a/packages/test-simple/test/test-basic.el
+++ b/packages/test-simple/test/test-basic.el
@@ -14,7 +14,7 @@
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see
;; <http://www.gnu.org/licenses/>.
-(require 'cl)
+(require 'cl-lib)
(load-file "../test-simple.el")
(test-simple-start "test-simple.el")
diff --git a/packages/test-simple/test/test-fns.el
b/packages/test-simple/test/test-fns.el
index bd340f0..cad655e 100644
--- a/packages/test-simple/test/test-fns.el
+++ b/packages/test-simple/test/test-fns.el
@@ -14,7 +14,7 @@
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see
;; <http://www.gnu.org/licenses/>.
-(require 'cl)
+(require 'cl-lib)
(load-file "../test-simple.el")
(test-simple-clear)
@@ -28,11 +28,11 @@
(note "Summary information")
(assert-matches "0 failures in 0 assertions" (test-simple-summary-line
test-info)
"initial summary")
-(incf (test-info-assert-count test-info))
-(incf (test-info-failure-count test-info))
+(cl-incf (test-info-assert-count test-info))
+(cl-incf (test-info-failure-count test-info))
(assert-matches "1 failure in 1 assertion" (test-simple-summary-line test-info)
"handling singular correctly")
-(incf (test-info-assert-count test-info))
+(cl-incf (test-info-assert-count test-info))
(assert-matches "1 failure in 2 assertions" (test-simple-summary-line
test-info)
"back to plural for two assertions")
diff --git a/packages/test-simple/test/test-no-clear.el
b/packages/test-simple/test/test-no-clear.el
index 45822bd..748baa0 100644
--- a/packages/test-simple/test/test-no-clear.el
+++ b/packages/test-simple/test/test-no-clear.el
@@ -14,7 +14,7 @@
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see
;; <http://www.gnu.org/licenses/>.
-(require 'cl)
+(require 'cl-lib)
(load-file "../test-simple.el")
;; We don't do this or test-simple-start
;; (test-simple-clear)
- [elpa] master d9abe19 08/26: gcd-tests.el: Add test-simple-run comment line, (continued)
- [elpa] master d9abe19 08/26: gcd-tests.el: Add test-simple-run comment line, Rocky Bernstein, 2017/05/25
- [elpa] master a8bd341 22/26: Merge pull request #11 from doomvox/tap_stdout, Rocky Bernstein, 2017/05/25
- [elpa] master 6fd325b 17/26: Merge pull request #10 from syohex/switch-to-cask, Rocky Bernstein, 2017/05/25
- [elpa] master 611bd94 16/26: Switch from Carton to Cask, Rocky Bernstein, 2017/05/25
- [elpa] master e199434 20/26: Minor changes, Rocky Bernstein, 2017/05/25
- [elpa] master 8204b89 10/26: .travis.yml: Drop support of Emacs23 (Test in Emacs24), Rocky Bernstein, 2017/05/25
- [elpa] master 35ef95d 09/26: Mention test-simple-run in README.md, Rocky Bernstein, 2017/05/25
- [elpa] master 613fe8b 19/26: Version 1.2.0 sync with elpa, Rocky Bernstein, 2017/05/25
- [elpa] master 604942d 24/26: Merge pull request #12 from syohex/cl-lib, Rocky Bernstein, 2017/05/25
- [elpa] master a2383c7 26/26: Bump version .., Rocky Bernstein, 2017/05/25
- [elpa] master e18adb1 25/26: Merge commit '604942d36021a8b14877a0a640234a09c79e0927',
Rocky Bernstein <=
- [elpa] master 187808a 21/26: TAP output in batch mode now goes to stdout, not stderr, Rocky Bernstein, 2017/05/25
- [elpa] master 0d2969f 23/26: Use cl-lib instead of cl.el, Rocky Bernstein, 2017/05/25
- [elpa] master e904e38 12/26: Mention M-x test-simple-run in README.md, Rocky Bernstein, 2017/05/25
- [elpa] master 4c40e8d 15/26: A spelling typo, Rocky Bernstein, 2017/05/25
- [elpa] master 3056b86 13/26: Merge pull request #9 from rubikitch/test-runner, Rocky Bernstein, 2017/05/25
- [elpa] master 95e58b5 18/26: Why didn't I do this before?!, Rocky Bernstein, 2017/05/25