From 16029fcda4db7da55075e0ae161331b9878f8c30 Mon Sep 17 00:00:00 2001
From: "Robert P. Goldman" <rpgoldman@real-time.com>
Date: Fri, 5 Feb 2010 16:51:18 -0600
Subject: [PATCH] Fixed bugs in the tests.

There were bugs in the tests having to do with repeatedly calling
quit-on-error in a single test script.  Only one of those calls
will be evaluated, and then the script will exit.  That means that
multiple calls to quit-on-error masked failures in the tests.

Also fixed a package-related error in test1.script that I conjecture
led to the mistaken use of multiple calls to quit-on-error.
---
 test/test-force.script             |  3 +--
 test/test-static-and-serial.script |  3 +--
 test/test1.script                  | 10 ++++------
 3 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/test/test-force.script b/test/test-force.script
index a4e5bb95..9a4fcbfd 100644
--- a/test/test-force.script
+++ b/test/test-force.script
@@ -5,9 +5,8 @@
  (setf asdf:*central-registry* '(*default-pathname-defaults*))
 
  (asdf:operate 'asdf:load-op 'test-force)
- (defvar file1-date (file-write-date (asdf:compile-file-pathname* "file1"))))
+ (defvar file1-date (file-write-date (asdf:compile-file-pathname* "file1")))
 
-(quit-on-error
  ;; unforced, date should stay same
  (sleep 1)
  (asdf:operate 'asdf:load-op 'test-force)
diff --git a/test/test-static-and-serial.script b/test/test-static-and-serial.script
index 79501147..e85b5a02 100644
--- a/test/test-static-and-serial.script
+++ b/test/test-static-and-serial.script
@@ -5,9 +5,8 @@
  (setf asdf:*central-registry* '(*default-pathname-defaults*))
 
  (asdf:operate 'asdf:load-op 'static-and-serial)
- (defvar file1-date (file-write-date (asdf:compile-file-pathname* "file1"))))
+ (defvar file1-date (file-write-date (asdf:compile-file-pathname* "file1")))
 
-(quit-on-error
  ;; cheat
  (setf asdf::*defined-systems* (make-hash-table :test 'equal))
 
diff --git a/test/test1.script b/test/test1.script
index c9c8aa6a..6183b17f 100644
--- a/test/test1.script
+++ b/test/test1.script
@@ -7,15 +7,13 @@
  (asdf:operate 'asdf:load-op 'test1)
 
  ;; test that it compiled
- (defvar file1-date (file-write-date (asdf:compile-file-pathname* "file1"))))
+ (defvar file1-date (file-write-date (asdf:compile-file-pathname* "file1")))
 
-(quit-on-error
- (assert (and file1-date (file-write-date (asdf:compile-file-pathname* "file2")))))
+ (assert (and file1-date (file-write-date (asdf:compile-file-pathname* "file2"))))
 
-;; and loaded
-(assert test-package::*file1*)
+ ;; and loaded
+ (assert (eval (intern (symbol-name '#:*file1*) :test-package)))
 
-(quit-on-error
  ;; now remove one output file and check that the other is _not_
  ;; recompiled
  (sleep 1) ; mtime has 1-second granularity, so pause here for fast machines
-- 
GitLab