Some checks failed
Deploy-Agent-V15-Stdin / JOB-V15-STDIN (push) Failing after 8s
- Fix critical paren balance issues across harness/skills.org, act.org, loop.org, memory.org, and skills/self-edit|emacs-edit.org - Add :reload-skill cognitive tool for hot-reloading without restart - Add :generate-embeddings tool and self-edit hot-reload infrastructure - Wire all new skills (self-edit, emacs-edit, lisp-utils) into main ASDF - Regenerate all .lisp tangled files via emacs --batch org-babel-tangle - Add :opencortex/tests ASDF system with 14 test suites - Fix test files to compile cleanly (self-edit-tests symbol vis, etc.)
35 lines
1.1 KiB
Common Lisp
35 lines
1.1 KiB
Common Lisp
(defpackage :opencortex-emacs-edit-tests
|
|
(:use :cl :fiveam :opencortex)
|
|
(:export #:emacs-edit-suite))
|
|
|
|
(in-package :opencortex-emacs-edit-tests)
|
|
|
|
(def-suite emacs-edit-suite
|
|
:description "Tests for Emacs Edit skill.")
|
|
|
|
(in-suite emacs-edit-suite)
|
|
|
|
(test id-generation
|
|
(let ((id1 (emacs-edit-generate-id))
|
|
(id2 (emacs-edit-generate-id)))
|
|
(is (plusp (length id1)))
|
|
(is (not (string= id1 id2))))) ;; Likely unique
|
|
|
|
(test id-format
|
|
(let ((formatted (emacs-edit-id-format "abc12345")))
|
|
(is (search "id:" formatted))))
|
|
|
|
(test property-setter
|
|
(let ((ast (list :type :headline
|
|
:properties (list :ID "id:test123" :TITLE "Test")
|
|
:contents nil)))
|
|
(emacs-edit-set-property ast "id:test123" :STATUS "ACTIVE")
|
|
(is (string= (getf (getf ast :properties) :STATUS) "ACTIVE"))))
|
|
|
|
(test todo-setter
|
|
(let ((ast (list :type :headline
|
|
:properties (list :ID "id:todo001" :TITLE "Task")
|
|
:contents nil)))
|
|
(emacs-edit-set-todo ast "id:todo001" "DONE")
|
|
(is (string= (getf (getf ast :properties) :TODO) "DONE"))))
|