summaryrefslogtreecommitdiff
path: root/test/tests.lisp
diff options
context:
space:
mode:
authormRnea <[email protected]>2024-08-09 11:54:22 +0300
committermRnea <[email protected]>2024-08-09 11:54:22 +0300
commite7b5f4fec78a09cc3ad8cf23e1f5a9b63638e187 (patch)
tree8180f20f0ebce4fcb39c0feb171d2ba5e2368505 /test/tests.lisp
parentb574944656e3a0fa469a728ec7ed4483befb73de (diff)
C code passes all tests
Diffstat (limited to 'test/tests.lisp')
-rw-r--r--test/tests.lisp13
1 files changed, 8 insertions, 5 deletions
diff --git a/test/tests.lisp b/test/tests.lisp
index 6096bf4..e51aad2 100644
--- a/test/tests.lisp
+++ b/test/tests.lisp
@@ -66,16 +66,19 @@
"---actual output---"
output))))
;; delete generated .asm .o and executable file
- (delete-file (probe-file (change-file-type abs-path "asm")))
- (delete-file (probe-file (change-file-type abs-path "o")))
+ (case target
+ (:nasm (delete-file (probe-file (change-file-type abs-path "asm")))
+ (delete-file (probe-file (change-file-type abs-path "o"))))
+ (:c (delete-file (probe-file (change-file-type abs-path "c")))))
(delete-file (probe-file (drop-file-type abs-path)))))
successful))
-(defun run-tests (&optional (ignore-err nil))
+(defun run-tests (&key (ignore-err nil) (target :nasm))
(loop for success?
in (mapcar (lambda (file) (if (not ignore-err)
- (run-test file)
- (ignore-errors (run-test file))))
+ (run-test file :target target)
+ (ignore-errors
+ (run-test file :target target))))
(remove-if-not (lambda (file)
(string= "lorth" (pathname-type file)))
(cl-fad:list-directory