From 4b0625d744e73e9e7ad3708320fba7fa2cab21ae Mon Sep 17 00:00:00 2001 From: David Bremner Date: Thu, 5 May 2022 08:29:23 -0300 Subject: provide macro WITH-RESET-DATA-SOURCES As the docstring hints, this will be used in the test suite. Signed-off-by: David Bremner --- src/data.lisp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/data.lisp') diff --git a/src/data.lisp b/src/data.lisp index 9a219c3..d5d9d4c 100644 --- a/src/data.lisp +++ b/src/data.lisp @@ -143,6 +143,15 @@ This function is typically called at the REPL." *data-sources* nil *data-source-registrations* nil)) +(defmacro with-reset-data-sources (&body body) + "Run BODY with initially empty data sources and string data. + +This macro is typically used for testing or debugging." + `(let ((*string-data* (make-hash-table)) + *data-sources* + *data-source-registrations*) + ,@body)) + (defun get-data-string (iden1 iden2) "Return the content of an item of prerequisite data as a string. -- cgit v1.2.3