Changeset 11559 in project


Ignore:
Timestamp:
08/08/08 08:01:41 (13 years ago)
Author:
Alex Shinn
Message:

Removing extraneous space in truncated strings, exporting
`truncate-source', catching non-test-enclosed errors in test-group.

Location:
release/3/test
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • release/3/test/test-support.scm

    r11539 r11559  
    2323         test-group-inc! test-group-push!
    2424         test-failure-count
     25         write-to-string
     26         truncate-source
    2527         ))
    2628
     
    135137        (name (test-get-name! info)))
    136138    (display name)
    137     (display " ")
    138139    (let ((diff (- width 9 (string-length name))))
    139       (if (positive? diff)
    140         (display (make-string diff #\.))))
     140      (cond
     141       ((positive? diff)
     142        (display " ")
     143        (display (make-string diff #\.)))))
    141144    (display " ")
    142145    (flush-output)))
  • release/3/test/test.scm

    r5306 r11559  
    102102            (syntax-error 'test-group "a name is required, got " 'name-expr name))
    103103          (test-begin name)
    104           body ...
     104          (condition-case (begin body ...)
     105            (e ()
     106               (warning "error in group outside of tests")
     107               (print-error-message e)
     108               (test-group-inc! (current-test-group) 'count)
     109               (test-group-inc! (current-test-group) 'ERROR)))
    105110          (test-end name)
    106111          (current-test-group old-group))))))
     
    115120           (syntax-error 'test-group "a name is required, got " ',name-expr ,name))
    116121         (test-begin ,name)
    117          ,@body
     122         (condition-case (begin ,@body)
     123           (e ()
     124              (warning "error in group outside of tests")
     125              (print-error-message e)
     126              (test-group-inc! (current-test-group) 'count)
     127              (test-group-inc! (current-test-group) 'ERROR)))
    118128         (test-end ,name)
    119129         (current-test-group ,old-group))))
  • release/3/test/test.setup

    r11539 r11559  
    66 '((syntax)
    77  (require-at-runtime test-support)
    8   (version 0.9.2)))
     8  (version 0.9.3)))
Note: See TracChangeset for help on using the changeset viewer.