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

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

[elpa] externals/pyim ff803f6 2/4: 从 git.savannah.gnu.org 下载测试需要的文件.


From: ELPA Syncer
Subject: [elpa] externals/pyim ff803f6 2/4: 从 git.savannah.gnu.org 下载测试需要的文件.
Date: Thu, 9 Dec 2021 20:57:34 -0500 (EST)

branch: externals/pyim
commit ff803f6496ec7c7256f6fa686f4b478e7748469d
Author: Feng Shu <tumashu@163.com>
Commit: Feng Shu <tumashu@163.com>

    从 git.savannah.gnu.org 下载测试需要的文件.
---
 Makefile            | 10 +++++-----
 tests/pyim-tests.el | 17 +++++++++++++----
 2 files changed, 18 insertions(+), 9 deletions(-)

diff --git a/Makefile b/Makefile
index 855d7ca..209c898 100644
--- a/Makefile
+++ b/Makefile
@@ -10,11 +10,11 @@ clean:
 .PHONY: deps
 deps:
        @mkdir -p deps;
-       @if [ ! -f deps/xr.el ]; then curl -L 
https://github.com/mattiase/xr/raw/master/xr.el > deps/xr.el; fi;
-       @if [ ! -f deps/async.el ]; then curl -L 
https://github.com/jwiegley/emacs-async/raw/master/async.el > deps/async.el; fi;
-       @if [ ! -f deps/popup.el ]; then curl -L 
https://github.com/auto-complete/popup-el/raw/master/popup.el > deps/popup.el; 
fi;
-       @if [ ! -f deps/pyim-basedict.el ]; then curl -L 
https://github.com/tumashu/pyim-basedict/raw/master/pyim-basedict.el > 
deps/pyim-basedict.el; fi;
-       @if [ ! -f deps/pyim-basedict.pyim ]; then curl -L 
https://github.com/tumashu/pyim-basedict/raw/master/pyim-basedict.pyim > 
deps/pyim-basedict.pyim; fi;
+       @if [ ! -f deps/xr.el ]; then curl -L 
https://git.savannah.gnu.org/cgit/emacs/elpa.git/plain/xr.el?h=externals/xr > 
deps/xr.el; fi;
+       @if [ ! -f deps/async.el ]; then curl -L 
https://git.savannah.gnu.org/cgit/emacs/elpa.git/plain/async.el?h=externals/async
 > deps/async.el; fi;
+       @if [ ! -f deps/popup.el ]; then curl -L 
https://git.savannah.gnu.org/cgit/emacs/nongnu.git/plain/popup.el?h=elpa/popup 
> deps/popup.el; fi;
+       @if [ ! -f deps/pyim-basedict.el ]; then curl -L 
https://git.savannah.gnu.org/cgit/emacs/elpa.git/plain/pyim-basedict.el?h=externals/pyim-basedict
 > deps/pyim-basedict.el; fi;
+       @if [ ! -f deps/pyim-basedict.pyim ]; then curl -L 
https://git.savannah.gnu.org/cgit/emacs/elpa.git/plain/pyim-basedict.pyim?h=externals/pyim-basedict
 > deps/pyim-basedict.pyim; fi;
 
 .PHONY: test
 test: deps clean
diff --git a/tests/pyim-tests.el b/tests/pyim-tests.el
index 0bfe729..3be31d0 100644
--- a/tests/pyim-tests.el
+++ b/tests/pyim-tests.el
@@ -35,10 +35,19 @@
 (require 'pyim-dhashcache)
 
 ;; ** 单元测试前的准备工作
-(setq default-input-method "pyim")
-(require 'pyim-basedict nil t)
-(with-eval-after-load "pyim-basedict"
-  (pyim-basedict-enable))
+(defun pyim-test-get-pyim-basedict ()
+  "获取到 pyim-basedict.pyim 的信息."
+  (let* ((files (ignore-errors
+                  (directory-files-recursively
+                   (expand-file-name (concat default-directory "/deps/"))
+                   "pyim-basedict\.pyim$"))))
+    (when files
+      (mapcar (lambda (f)
+                (list :name (file-name-base f) :file f))
+              files))))
+
+(when-let ((dicts (pyim-test-get-pyim-basedict)))
+  (setq pyim-dicts dicts))
 
 (pyim-dcache-init-variables)
 



reply via email to

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