delete tests

This commit is contained in:
Kinneyzhang 2026-01-07 11:53:05 +08:00
parent 710e52c67f
commit 9bcf14b2b3

View File

@ -11,6 +11,7 @@
(require 'ert) (require 'ert)
(require 'cl-lib) (require 'cl-lib)
(require 'tp-palette)
;; Load tp.el from the same directory ;; Load tp.el from the same directory
(let ((tp-dir (file-name-directory (or load-file-name buffer-file-name)))) (let ((tp-dir (file-name-directory (or load-file-name buffer-file-name))))
@ -2487,33 +2488,6 @@ preserving the native text property behavior."
(makunbound 'tp-test-group-watch-var) (makunbound 'tp-test-group-watch-var)
(makunbound 'tp-test-group-watch-log)))) (makunbound 'tp-test-group-watch-log))))
(ert-deftest tp-test-define-layer-group-with-compute ()
"Test define-tps with :compute (format-4)."
(tp-test-with-temp-buffer
(unwind-protect
(progn
(setq tp-test-group-first "Group")
(setq tp-test-group-last "Test")
(define-tps test-compute-group ()
'("computed" :props (help-echo $tp-test-group-full)
:data (tp-test-group-first tp-test-group-last)
:compute '((tp-test-group-full
(lambda ()
(concat tp-test-group-first " " tp-test-group-last)))))
'("static" :props (face (:foreground "blue"))))
;; Check the group is defined
(should (assoc 'test-compute-group tp-layer-groups))
;; Check the computed layer has its compute registered
(should (assoc 'test-compute-group-computed tp-layer-computed))
;; Static layer should not have computed
(should-not (assoc 'test-compute-group-static tp-layer-computed))
;; Check computed value
(should (equal tp-test-group-full "Group Test")))
;; Cleanup
(makunbound 'tp-test-group-first)
(makunbound 'tp-test-group-last)
(makunbound 'tp-test-group-full))))
(ert-deftest tp-test-reactive-reset-clears-all () (ert-deftest tp-test-reactive-reset-clears-all ()
"Test tp-reactive-reset clears watchers, computed, and data." "Test tp-reactive-reset clears watchers, computed, and data."
(tp-test-with-temp-buffer (tp-test-with-temp-buffer
@ -3883,26 +3857,6 @@ internally, and the final result should have face properties, not tp-palette."
;; Later value should override ;; Later value should override
(should (equal (plist-get face-prop :foreground) "yellow")))))) (should (equal (plist-get face-prop :foreground) "yellow"))))))
(ert-deftest tp-test-merge-face-symbol-and-plist ()
"Test merging face symbol with face plist."
(tp-test-with-temp-buffer
(let ((result (tp-set "emacs"
'face 'bold
'face '(:background "green")
'face '(:foreground "red"))))
(let ((face-prop (get-text-property 0 'face result)))
;; Should be a list with plist and symbol
(should (listp face-prop))
;; First element should be the merged plist (plists merge together)
(should (listp (car face-prop)))
(should (keywordp (caar face-prop)))
;; Check the merged plist has both properties
(let ((merged-plist (car face-prop)))
(should (equal (plist-get merged-plist :background) "green"))
(should (equal (plist-get merged-plist :foreground) "red")))
;; bold should be in the list
(should (memq 'bold face-prop))))))
(ert-deftest tp-test-merge-other-props-later-overrides () (ert-deftest tp-test-merge-other-props-later-overrides ()
"Test that non-face duplicate properties use later value." "Test that non-face duplicate properties use later value."
(tp-test-with-temp-buffer (tp-test-with-temp-buffer