Commit f61c0dba authored by Yuanle Song's avatar Yuanle Song
Browse files

v2.10.2 moved zero-input-panel-minibuffer-test to its own file.

- zero-input-reload-all.el now load byte-compile-flags.el
  so flags are maintained in one place.
parent 69fc20cd
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -8,7 +8,11 @@ default: dist
# multiple file
#===============
check:
	$(EMACS) -Q --batch -l zero-input-reload-all.el -f zero-input-rebuild -l zero-input-table.el -l zero-input-table-test.el -f ert-run-tests-batch
	$(EMACS) -Q --batch \
		-l zero-input-reload-all.el -f zero-input-rebuild \
		-l zero-input-table.el \
		-l zero-input-table-test.el \
		-f ert-run-tests-batch-and-exit
zip:
	git archive -o zero-input-el-$(VERSION).zip --prefix=zero-input/ HEAD
#==========================
+15 −1
Original line number Diff line number Diff line
* COMMENT -*- mode: org -*-
#+Date: 2019-10-08
Time-stamp: <2024-05-26>
Time-stamp: <2024-05-27>
#+STARTUP: content
* notes                                                               :entry:
** 2019-04-01 zero-el a Chinese IM framework in emacs; FSM              :doc:
@@ -251,6 +251,20 @@ I don't know it should recommend or suggest.
** 2019-10-23 checkdoc and package-lint can't ignore some non-issues.
I can't run them in git pre-commit hook.
* done                                                                :entry:
** 2024-05-27 separate tests from zero-input-panel-minibuffer.el
- problems
  - Error: error ("Test ‘zero-input-panel-minibuffer-make-string’ redefined (or loaded twice)")
    what's going on here?
    fixed. zero-input-rebuild will byte compile and load the files.

    nope. still same error.

    I think I know why.
    (package-initialize)
    this line may load the old zero-input-panel-minibuffer.
    yes. that fix it.

** 2024-05-26 I have to use a new git repo. otherwise the tag version will conflict.
** 2024-05-26 make a release on melpa.
- DONE should zero-input-panel-minibuffer.el be included in zero-input.el?
  it doesn't require any other package.
+1 −1
Original line number Diff line number Diff line
@@ -133,7 +133,7 @@ If item is not in lst, return nil."

;; zero-input-el version
(defvar zero-input-version nil "Zero package version.")
(setq zero-input-version "2.10.1")
(setq zero-input-version "2.10.2")

(defvar zero-input-panel-is-ephemeral nil
  "Stores whether the panel service is ephemeral or not.
+42 −0
Original line number Diff line number Diff line
;;; zero-input-panel-minibuffer-test.el --- tests for zero-input-panel-minibuffer.el -*- lexical-binding: t -*-

;; Licensed under the Apache License, Version 2.0 (the "License");
;; you may not use this file except in compliance with the License.
;; You may obtain a copy of the License at
;;
;;     http://www.apache.org/licenses/LICENSE-2.0
;;
;; Unless required by applicable law or agreed to in writing, software
;; distributed under the License is distributed on an "AS IS" BASIS,
;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
;; See the License for the specific language governing permissions and
;; limitations under the License.

;;; Commentary:

;;

;;; Code:

(require 'ert)
(require 'zero-input-panel-minibuffer)

(ert-deftest zero-input-panel-minibuffer-zip-pair ()
  (should (equal
	   (zero-input-panel-minibuffer--zip-pair '(1 2 3 4 5 6) '("a" "b" "c"))
	   '((1 . "a") (2 . "b") (3 . "c"))))
  (should (equal
	   (zero-input-panel-minibuffer--zip-pair '(1 2 3 4 5 6) '())
	   nil)))

(ert-deftest zero-input-panel-minibuffer-make-string ()
  (should (equal
	   (zero-input-panel-minibuffer-make-string '("a" "b" "c"))
	   "1.a 2.b 3.c"))
  (should (equal
	   (zero-input-panel-minibuffer-make-string '("a" "b" "c" "d"))
	   "1.a 2.b 3.c 4.d")))

(provide 'zero-input-panel-minibuffer-test)

;;; zero-input-panel-minibuffer-test.el ends here
+0 −14
Original line number Diff line number Diff line
@@ -72,20 +72,6 @@ off.")
				(cl-loop for i from 1 to 10 collect i)
				candidates)) " "))

(ert-deftest zero-input-panel-minibuffer-make-string ()
  (should (equal
	   (zero-input-panel-minibuffer--zip-pair '(1 2 3 4 5 6) '("a" "b" "c"))
	   '((1 . "a") (2 . "b") (3 . "c"))))
  (should (equal
	   (zero-input-panel-minibuffer--zip-pair '(1 2 3 4 5 6) '())
	   nil))
  (should (equal
	   (zero-input-panel-minibuffer-make-string '("a" "b" "c"))
	   "1.a 2.b 3.c"))
  (should (equal
	   (zero-input-panel-minibuffer-make-string '("a" "b" "c" "d"))
	   "1.a 2.b 3.c 4.d")))

(defun zero-input-panel-minibuffer-show-candidates (preedit-str _candidate-count candidates hints)
  "Show CANDIDATES using minibuffer package.
Argument PREEDIT-STR user typed characters.
Loading