activity-servist/t/signatures.lisp
Jaidyn Ann bf404c7605 Add core object tests to ACTIVITY-VOCABULARY
… also add RUN function to both test packages.
2024-06-22 15:07:58 -05:00

38 lines
1.4 KiB
Common Lisp
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

;;;; activitypub-servist/tests/signatures: Testing activitypub-servist/signatures.
;; Copyright © 2024 Jaidyn Levesque <jadedctrl@posteo.at>
;;
;; This program is free software: you can redistribute it and/or
;; modify it under the terms of the GNU Affero 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 Affero General Public License for more details.
;;
;; You should have received a copy of the GNU Affero General Public License
;; along with this program. If not, see <https://www.gnu.org/licenses/>.
(defpackage :activitypub-servist/tests/signatures
(:use :cl :lisp-unit2)
(:nicknames "AP-S/T/S")
(:export :run))
(in-package :activitypub-servist/tests/signatures)
(defun run ()
"Run all SIGNATURES tests."
(lisp-unit2:with-summary ()
(lisp-unit2:run-tests :package :activitypub-servist/tests/signatures)))
;;; Test definitions
;;; ————————————————————————————————————————
(define-test string-sha256sum (:tags '(misc))
(assert-equal
"erws/VxJ7XO5xQBqpwHIUwG0P4q1Ek2D4N053+E2Ib8="
(ap-s/s::string-sha256sum "This is a testing string~! ♥ ĉu ne?~")))