From d58260dbc8109c5c49a108bffcf387981a2c1121 Mon Sep 17 00:00:00 2001 From: Matthew Butterick Date: Sat, 10 Aug 2013 16:55:46 -0700 Subject: [PATCH] update --- tests/requires/include-me.rkt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/requires/include-me.rkt b/tests/requires/include-me.rkt index 12c2e2a..ff36178 100644 --- a/tests/requires/include-me.rkt +++ b/tests/requires/include-me.rkt @@ -14,15 +14,16 @@ (module+ test (check-equal? (meta-proc '(meta "key" "value")) '(meta ((name "key")(content "value"))))) - -;; how a paragraph break is denoted: a string of two or more newlines +;; is x a paragraph break? (define/contract (paragraph-break? x) (any/c . -> . boolean?) + ;; paragraph break = a string of two or more newlines (and (string? x) (>= (len x) 2) (equal? x (make-string (len x) #\newline)))) - + (module+ test (check-false (paragraph-break? "foo")) (check-false (paragraph-break? "\n")) + (check-false (paragraph-break? "\n \n")) (check-true (paragraph-break? "\n\n")) (check-true (paragraph-break? "\n\n\n")))