1
0
Fork 0

Test isearch-mode diminishing using a constant

Apparently in the docker container that’s running the tests, reading  from the
command-line makes it a multibyte character (105 776 127 130), but defined in
Emacs it’s a unibyte character (61442). This might have something to do with
UTF-16 vs UTF-8?
This commit is contained in:
Tom Willemse 2020-04-08 23:48:56 -07:00
parent df4d188d3f
commit dcffe90e3c
2 changed files with 9 additions and 5 deletions

View file

@ -4,7 +4,7 @@
;; Author: Tom Willemse <tom@ryuslash.org> ;; Author: Tom Willemse <tom@ryuslash.org>
;; Keywords: local ;; Keywords: local
;; Version: 2020.0408.103604 ;; Version: 2020.0408.234044
;; Package-Requires: (oni-ui oni-hydra yoshi-theme diminish) ;; Package-Requires: (oni-ui oni-hydra yoshi-theme diminish)
;; This program is free software; you can redistribute it and/or modify ;; This program is free software; you can redistribute it and/or modify
@ -30,7 +30,9 @@
(add-to-list 'default-frame-alist '(internal-border-width . 15)) (add-to-list 'default-frame-alist '(internal-border-width . 15))
(set-face-font 'variable-pitch "Comic Neue-14") (set-face-font 'variable-pitch "Comic Neue-14")
(set-fontset-font t ? "Font Awesome 5 Free Solid") (defconst oni-gui-isearch-icon ?)
(set-fontset-font t oni-gui-isearch-icon "Font Awesome 5 Free Solid")
(set-fontset-font t ? "Font Awesome 5 Free Solid") (set-fontset-font t ? "Font Awesome 5 Free Solid")
(set-fontset-font t ? "Font Awesome 5 Free Solid") (set-fontset-font t ? "Font Awesome 5 Free Solid")
(set-fontset-font t ? "Font Awesome 5 Free Solid") (set-fontset-font t ? "Font Awesome 5 Free Solid")
@ -49,7 +51,7 @@
(set-fontset-font t ?✸ "DejaVu Sans Mono") (set-fontset-font t ?✸ "DejaVu Sans Mono")
(set-fontset-font t ?✿ "DejaVu Sans Mono") (set-fontset-font t ?✿ "DejaVu Sans Mono")
(diminish 'isearch-mode "") (diminish 'isearch-mode (string ?\s oni-gui-isearch-icon))
(defhydra oni-gui-hydra (:color teal :hint nil) (defhydra oni-gui-hydra (:color teal :hint nil)
" "

View file

@ -11,7 +11,8 @@
@test "Opening emacs diminishes isearch-mode" { @test "Opening emacs diminishes isearch-mode" {
run emacs -batch -l package -f package-initialize \ run emacs -batch -l package -f package-initialize \
-eval "(prin1 (string= \" \" (car (alist-get 'isearch-mode minor-mode-alist))))" -eval "(prin1 (string= (string ?\s oni-gui-isearch-icon)
(car (alist-get 'isearch-mode minor-mode-alist))))"
echo "$output" echo "$output"
@ -21,7 +22,8 @@
@test "Reloading isearch diminishes isearch-mode" { @test "Reloading isearch diminishes isearch-mode" {
run emacs -batch -l package -f package-initialize \ run emacs -batch -l package -f package-initialize \
-eval "(load-library \"isearch\")" \ -eval "(load-library \"isearch\")" \
-eval "(prin1 (string= \" \" (car (alist-get 'isearch-mode minor-mode-alist))))" -eval "(prin1 (string= (string ?\s oni-gui-isearch-icon)
(car (alist-get 'isearch-mode minor-mode-alist))))"
echo "$output" echo "$output"