(module util-test mzscheme

  (require "test.ss"
  (require "info.ss")

  (provide util-tests)

  ;; FIXME: Two problems
  ;; 1 - This is not the way to test require/expose: if this fails, it
  ;;     prevents the tests from loading.
  ;; 2 - For whatever reason, it *does* fail when loaded via PLaneT.
  ;;     Still waiting for resolution on a bug report.
  #;(require/expose "assert-test.ss" (good*))
  (define util-tests
     "Util tests"
      "good* required from assert-test.ss"
        (assert-true (procedure? good*))
        (assert-equal? '(0 1) (procedure-arity good*))
        (assert-true (good*))))

      "Test make-test-suite*"
      (let ((result
               "Test make-test-suite*"
               ("Test 1" (assert = 1 1))
               ("Test 2" (assert = 1 1) (assert = 2 4))))))
        (assert = (length result) 2)
        (assert-true (test-success? (car result)))
        (assert-true (test-failure? (cadr result)))))

      "Simple assert-regexp test"
      (assert-regexp-match "a*bba"

      "assert-regexp-match failure"
       (lambda ()
         (assert-regexp-match* "a+bba" "aaaabbba"))))