From 0fdcbf0a159c9ee4df69bad2c617de01dcb0fd3c Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sun, 16 Apr 2023 19:55:53 +0200 Subject: Add test system Write a test for the `write-xfdf` function. Worked out how to create the test system from: - https://lispcookbook.github.io/cl-cookbook/testing.html - https://github.com/sjl/cl-digraph/blob/master/cl-digraph.test.asd - https://github.com/fukamachi/dexador/blob/master/dexador-test.asd Add the test string to the `write-xfdf` function to pass the test and check that the test runner is set up correctly. --- src/package.lisp | 4 +++- src/xfdf.lisp | 17 +++++++++++++++-- 2 files changed, 18 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/package.lisp b/src/package.lisp index d535a24..e914975 100644 --- a/src/package.lisp +++ b/src/package.lisp @@ -1,2 +1,4 @@ (defpackage :xfdf - (:use :cl)) + (:use :cl) + + (:export #:write-xfdf)) diff --git a/src/xfdf.lisp b/src/xfdf.lisp index 315c63c..a61fcdd 100644 --- a/src/xfdf.lisp +++ b/src/xfdf.lisp @@ -1,13 +1,26 @@ (in-package :xfdf) (defun write-xfdf (output-stream fields) - (format output-stream " + (format output-stream "~ + ") ;; TODO ; (loop do) + (format output-stream " + Yes + + + Off + + + 123 Fake Street, Springfield + +") (format output-stream " -")) +") + + output-stream) -- cgit v1.2.3