(register-test '(suite "Pretty Printing Tests" ("a macro invocation" (pp '(mac pp/def (name args . body) `(hash-set pp/special-forms ',name (fn ,args ,@body)))) "(mac pp/def (name args body)\n `(hash-set pp/special-forms ',name (fn ,args ,@body)))") ("a 'def invocation" (pp '(def pp (form) (pp/main form 0))) "(def pp (form)\n (pp/main form 0))") ("combined with dox system" (pp:dox-src 'pp/find-breaks) "(def pp/find-breaks (form) (if (eq? 'if (car form)) (let if-args (cdr form) (cons (list 'if (car if-args)) (map list (cdr if-args)))) (or (pp/find-breaks/mac form) (list form))))") ("special syntax" (pp '(string-pieces "hello " (bang-syntax || (dot-syntax x y (ampersand-syntax foo bar))) " and welcome to " (prefix-list "%%" (a b c d)) " and friends!")) "\"hello ~~!x.y.foo&bar and welcome to ~~%%(a b c d) and friends!\"") ))