X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=tests%2Fprint.impure.lisp;h=b592d8490b671ded56b943f4e931f3fa770797fc;hb=e76ddf242a31a2acaae3a9cb818fa31500ebbf92;hp=d9fa69e0998f31c7a279591dff73a928eb8bd4c4;hpb=8097f555eb90f15c51b96e20bd88db15757247b9;p=sbcl.git diff --git a/tests/print.impure.lisp b/tests/print.impure.lisp index d9fa69e..b592d84 100644 --- a/tests/print.impure.lisp +++ b/tests/print.impure.lisp @@ -1,6 +1,18 @@ -(in-package :cl-user) +;;;; miscellaneous tests of printing stuff + +;;;; This software is part of the SBCL system. See the README file for +;;;; more information. +;;;; +;;;; While most of SBCL is derived from the CMU CL system, the test +;;;; files (like this one) were written from scratch after the fork +;;;; from CMU CL. +;;;; +;;;; This software is in the public domain and is provided with +;;;; absolutely no warranty. See the COPYING and CREDITS files for +;;;; more information. (load "assertoid.lisp") +(use-package "ASSERTOID") ;;; We should be able to output X readably (at least when *READ-EVAL*). (defun assert-readable-output (x) @@ -85,5 +97,11 @@ (assert (string= (format nil "~/cl-user:print-foo:print-foo/" 2) "2")) (assert (string= (format nil "~/cl-user::print-foo:print-foo/" 2) "2")) +;;; Check for error detection of illegal directives in a~<..~> justify +;;; block (see ANSI section 22.3.5.2) +(assert (raises-error? (format nil "~<~W~>" 'foo))) +(assert (raises-error? (format nil "~<~<~A~:>~>" '(foo)))) +(assert (string= (format nil "~<~<~A~>~>" 'foo) "FOO")) + ;;; success (quit :unix-status 104)