[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/popup 9dcce09 024/184: Merge branch 'master' of github.com
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/popup 9dcce09 024/184: Merge branch 'master' of github.com:auto-complete/popup-el |
Date: |
Wed, 6 Oct 2021 00:01:00 -0400 (EDT) |
branch: elpa/popup
commit 9dcce09f59d50560cb8bfad0f7d8cc2615f25014
Merge: 03b23bf 07901c6
Author: Tomohiro Matsuyama <tomo@cx4a.org>
Commit: Tomohiro Matsuyama <tomo@cx4a.org>
Merge branch 'master' of github.com:auto-complete/popup-el
---
.gitmodules | 3 ++
.travis.yml | 14 ++++++++
Makefile | 5 +++
lib/ert | 1 +
popup.el | 2 +-
popup-test.el => tests/popup-interactive-test.el | 0
tests/popup-test.el | 18 ++++++++++
tests/run-test.el | 42 ++++++++++++++++++++++++
8 files changed, 84 insertions(+), 1 deletion(-)
diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 0000000..e31e75c
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,3 @@
+[submodule "lib/ert"]
+ path = lib/ert
+ url = git://github.com/ohler/ert.git
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..57f385b
--- /dev/null
+++ b/.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
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..418837a
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,5 @@
+EMACS=emacs
+
+travis-ci:
+ ${EMACS} --version
+ ${EMACS} -batch -Q -l tests/run-test.el
diff --git a/lib/ert b/lib/ert
new file mode 160000
index 0000000..00aef6e
--- /dev/null
+++ b/lib/ert
@@ -0,0 +1 @@
+Subproject commit 00aef6e43d44c6f25323d1a7bdfdc929a3b4ce04
diff --git a/popup.el b/popup.el
index 8062cfd..34d3ad8 100644
--- a/popup.el
+++ b/popup.el
@@ -132,7 +132,7 @@ untouched."
(declare (indent 0))
`(save-excursion
(let ((buffer-undo-list t)
- (buffer-read-only nil)
+ (inhibit-read-only t)
(modified (buffer-modified-p)))
(unwind-protect
(progn ,@body)
diff --git a/popup-test.el b/tests/popup-interactive-test.el
similarity index 100%
rename from popup-test.el
rename to tests/popup-interactive-test.el
diff --git a/tests/popup-test.el b/tests/popup-test.el
new file mode 100644
index 0000000..e51e01f
--- /dev/null
+++ b/tests/popup-test.el
@@ -0,0 +1,18 @@
+(require 'ert)
+
+(require 'popup)
+
+(defmacro popup-test-with-common-setup (&rest body)
+ (declare (indent 0) (debug t))
+ `(save-excursion
+ (with-temp-buffer
+ (erase-buffer)
+ (let ((popup (popup-create (point) 10 10)))
+ ,@body
+ (popup-delete popup)))))
+
+(ert-deftest popup-test-simple ()
+ (popup-test-with-common-setup
+ (popup-set-list popup '("foo" "bar" "baz"))
+ (popup-draw popup)
+ (should (equal (popup-list popup) '("foo" "bar" "baz")))))
diff --git a/tests/run-test.el b/tests/run-test.el
new file mode 100644
index 0000000..4cb8022
--- /dev/null
+++ b/tests/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 popup-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 'popup-test-join-path rest))
+ path))
+
+(defvar popup-test-dir (file-name-directory load-file-name))
+(defvar popup-root-dir (concat popup-test-dir ".."))
+
+
+;; Setup `load-path'
+(mapc (lambda (p) (add-to-list 'load-path p))
+ (list popup-test-dir
+ popup-root-dir))
+
+
+;; Use ERT from github when this Emacs does not have it
+(unless (locate-library "ert")
+ (add-to-list
+ 'load-path
+ (popup-test-join-path popup-root-dir "lib" "ert" "lisp" "emacs-lisp"))
+ (require 'ert-batch)
+ (require 'ert-ui))
+
+
+;; Load tests
+(load "popup-test")
+
+
+;; Run tests
+(if noninteractive
+ (ert-run-tests-batch-and-exit)
+ (ert t))
- [nongnu] elpa/popup 581f35b 062/184: Define popup-menu-summary-face, (continued)
- [nongnu] elpa/popup 581f35b 062/184: Define popup-menu-summary-face, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup 4e19acb 036/184: Remove dependency on auto-complete, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup bec50cc 076/184: Merge pull request #41 from kostafey/master, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup 4e8824e 051/184: Add some make rules for test., ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup f2fc154 058/184: Add summary-face keyword argument to popup-create-line-string, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup b45aa2d 060/184: Handle summary-face in popup-draw, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup e645eae 049/184: Add test case:popup-scroll-down, popup-scroll-up, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup ee5b4b0 034/184: Add test case when point is on the corner, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup 1d692e4 066/184: Replace helper functions for some tests., ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup 25e2e7f 043/184: Merge pull request #17 from uk-ar/feature, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup 9dcce09 024/184: Merge branch 'master' of github.com:auto-complete/popup-el,
ELPA Syncer <=
- [nongnu] elpa/popup e995ffa 030/184: Add check for columns of starting points., ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup 8d7e57e 065/184: Replace popup-test-with-create-popup to popup-create, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup 357f037 045/184: Add test case:popup-tip(height), ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup b8c1cb4 054/184: At least one space before summary, if possible, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup 7533efe 078/184: Merge pull request #53 from auto-complete/fix-travis, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup 64102c2 046/184: Add test case:popup-tip(scroll-bar, min-height), ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup 487c0a8 109/184: add :initial-index parameter test, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup 8719cd9 105/184: Merge pull request #71 from auto-complete/use-cask, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup 1510820 100/184: activate isearch in cascade menu, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup 58f55de 096/184: Merge pull request #62 from auto-complete/support-max-width, ELPA Syncer, 2021/10/06