[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/alect-themes fb91899 210/269: Add (unignore) tests
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/alect-themes fb91899 210/269: Add (unignore) tests |
Date: |
Thu, 21 Oct 2021 17:59:21 -0400 (EDT) |
branch: elpa/alect-themes
commit fb9189959550481c839f3e21e34bf617a4903c1f
Author: Alex Kost <alezost@gmail.com>
Commit: Alex Kost <alezost@gmail.com>
Add (unignore) tests
* tests/alect-tests.el: New file.
* .gitignore: Remove "alect-test.el" line.
---
.gitignore | 1 -
tests/alect-tests.el | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 66 insertions(+), 1 deletion(-)
diff --git a/.gitignore b/.gitignore
index 25f94eb..f11089f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,4 @@
*.elc
screenshots
-alect-test.el
tmp
*-autoloads.el
diff --git a/tests/alect-tests.el b/tests/alect-tests.el
new file mode 100644
index 0000000..bc70dfa
--- /dev/null
+++ b/tests/alect-tests.el
@@ -0,0 +1,66 @@
+;;; alect-tests.el --- Tests for alect-themes package
+
+;; Copyright © 2013, 2016 Alex Kost <alezost@gmail.com>
+
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+;;
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License
+;; along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;; These tests can be run like this:
+;;
+;; cd /path/to/alect-themes
+;; emacs -Q -nw -L . --batch --eval '(progn (load-file
"tests/alect-tests.el") (ert-run-tests-batch-and-exit))'
+
+;;; Code:
+
+(require 'ert)
+(require 'alect-themes)
+
+(ert-deftest alect-test-substitute-colors ()
+ "Test functions for substituting colors."
+ (should (equal (alect-substitute-color
+ 'dark '(:foreground "pink" :background green-1) :foreground)
+ '(:foreground "pink" :background green-1)))
+ (should (equal (alect-substitute-color
+ 'dark '(:foreground "pink" :background green-1) :background)
+ '(:foreground "pink" :background "#32cd32")))
+ (should (equal (alect-substitute-colors-in-plist
+ 'light '(((:foreground "pink" :background green-1 :underline
t
+ :box (:line-width 1 :color fg :style
nil)))))
+ '(:foreground "pink" :background "#1c9e28" :underline t
+ :box (:line-width 1 :color "#3f3f3f" :style
nil))))
+ (should (equal (alect-substitute-colors-in-faces
+ 'light
+ '((fringe ((t (:background "pink"))))
+ (font-lock-string-face ((t :foreground green-1)))
+ (button ((((class color) (min-colors 88) (:background
blue)) (:foreground magenta))
+ (((class color) (background dark)) :foreground
"LightSkyBlue")
+ (((class color) (min-colors 16)) (:bold t
:background fg+2))
+ (t (:slant italic :box (:line-width 1 :color
red-1 :background cyan)))))))
+ '((fringe ((t :background "pink")))
+ (font-lock-string-face ((t :foreground "#1c9e28")))
+ (button ((((class color) (min-colors 88) (:background
blue)) :foreground "#a020f0")
+ (((class color) (background dark)) :foreground
"LightSkyBlue")
+ (((class color) (min-colors 16)) :bold t
:background "#101010")
+ (t :slant italic :box (:line-width 1 :color
"#e43838" :background cyan)))))))
+ (should (equal (alect-substitute-colors-in-faces
+ 'dark
+ '((hl-line ((((class color) (min-colors 256)) :background bg)
+ (t nil)))))
+ '((hl-line ((((class color) (min-colors 256)) :background
"#4f4f4f")
+ (t nil)))))))
+
+(provide 'alect-tests)
+
+;;; alect-tests.el ends here
- [nongnu] elpa/alect-themes a6e9b24 235/269: Add 'ido-indicator' face, (continued)
- [nongnu] elpa/alect-themes a6e9b24 235/269: Add 'ido-indicator' face, ELPA Syncer, 2021/10/21
- [nongnu] elpa/alect-themes 8a7774d 243/269: Adjust bg colors a bit, ELPA Syncer, 2021/10/21
- [nongnu] elpa/alect-themes 1812abb 247/269: Update version (0.8), ELPA Syncer, 2021/10/21
- [nongnu] elpa/alect-themes 6aff883 248/269: Inherit 'widget-documentation' from 'font-lock-doc-face', ELPA Syncer, 2021/10/21
- [nongnu] elpa/alect-themes 3785a17 260/269: Add 'org-ellipsis' face, ELPA Syncer, 2021/10/21
- [nongnu] elpa/alect-themes 02b22d7 261/269: Update guix faces, ELPA Syncer, 2021/10/21
- [nongnu] elpa/alect-themes 3858ddc 190/269: Some code tweaks, ELPA Syncer, 2021/10/21
- [nongnu] elpa/alect-themes ee6dbc0 199/269: Modify 'diff-file-header' face, ELPA Syncer, 2021/10/21
- [nongnu] elpa/alect-themes 8dbfc5d 200/269: Modify 'markdown-list-face', ELPA Syncer, 2021/10/21
- [nongnu] elpa/alect-themes 6fd786c 203/269: Add debbugs faces, ELPA Syncer, 2021/10/21
- [nongnu] elpa/alect-themes fb91899 210/269: Add (unignore) tests,
ELPA Syncer <=
- [nongnu] elpa/alect-themes aa64247 213/269: Remove old faces for Magit1, ELPA Syncer, 2021/10/21
- [nongnu] elpa/alect-themes 2300929 229/269: Modify magit-diff-lines faces, ELPA Syncer, 2021/10/21
- [nongnu] elpa/alect-themes e01abf0 230/269: Update guix faces for 0.2, ELPA Syncer, 2021/10/21
- [nongnu] elpa/alect-themes b392655 234/269: Update old links in README, ELPA Syncer, 2021/10/21
- [nongnu] elpa/alect-themes ded94ab 252/269: Add 'alect-file' auxiliary face, ELPA Syncer, 2021/10/21
- [nongnu] elpa/alect-themes 0ed602e 099/269: Fix typo (double space), ELPA Syncer, 2021/10/21