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-self-edit-tests
|
|
(:use :cl :fiveam :opencortex)
|
|
(:export #:self-edit-suite))
|
|
|
|
(in-package :opencortex-self-edit-tests)
|
|
|
|
(def-suite self-edit-suite
|
|
:description "Tests for Self-Edit skill.")
|
|
|
|
(in-suite self-edit-suite)
|
|
|
|
(test balance-parens-balanced
|
|
(let ((result (opencortex::self-edit-balance-parens "(+ 1 2)")))
|
|
(is (string= result "(+ 1 2)"))
|
|
(is (not (null (read-from-string result))))))
|
|
|
|
(test balance-parens-missing-open
|
|
(let ((result (opencortex::self-edit-balance-parens "+ 1 2)")))
|
|
(is (string= result "(+ 1 2)"))
|
|
(is (not (null (read-from-string result))))))
|
|
|
|
(test balance-parens-missing-close
|
|
(let ((result (opencortex::self-edit-balance-parens "(+ 1 2")))
|
|
(is (string= result "(+ 1 2)"))
|
|
(is (not (null (read-from-string result))))))
|
|
|
|
(test balance-parens-deep
|
|
(let ((result (opencortex::self-edit-balance-parens "((lambda (x) (if x (+ 1 2) 3))")))
|
|
(is (string= result "((lambda (x) (if x (+ 1 2) 3)))"))
|
|
(is (not (null (read-from-string result))))))
|
|
|
|
(test balance-parens-empty
|
|
(let ((result (opencortex::self-edit-balance-parens "")))
|
|
(is (string= result ""))))
|