From 748ccf1520d67b75d752e4e2dc20706312d9b7a8 Mon Sep 17 00:00:00 2001
From: Francois-Rene Rideau <tunes@google.com>
Date: Wed, 26 Dec 2012 15:13:38 -0500
Subject: [PATCH] Add a test for the bundle functionality. Remove long obsolete
 test5.

---
 test/test-bundle.script    | 26 ++++++++++++++++++++++++++
 test/test5.asd             |  9 ---------
 test/test5.not-implemented | 15 ---------------
 3 files changed, 26 insertions(+), 24 deletions(-)
 create mode 100644 test/test-bundle.script
 delete mode 100644 test/test5.asd
 delete mode 100644 test/test5.not-implemented

diff --git a/test/test-bundle.script b/test/test-bundle.script
new file mode 100644
index 00000000..51dca099
--- /dev/null
+++ b/test/test-bundle.script
@@ -0,0 +1,26 @@
+;;; -*- Lisp -*-
+(load "script-support.lisp")
+(load-asdf)
+
+;;;---------------------------------------------------------------------------
+;;; Check to see if the bundle functionality is doing something.
+;;;---------------------------------------------------------------------------
+
+
+(quit-on-error
+ (asdf:initialize-source-registry '(:source-registry :ignore-inherited-configuration))
+ (asdf:defsystem :test-bundle-1 :components ((:file "file1") (:file "file3")))
+ (asdf:defsystem :test-bundle-2 :depends-on (:test-bundle-1) :components ((:file "file2")))
+ (let* ((op (make-instance 'asdf::fasl-op))
+        (bundle-1 (asdf:output-file op (find-system :test-bundle-1)))
+        (bundle-2 (asdf:output-file op (find-system :test-bundle-2))))
+   (DBG :test-bundle bundle-1 bundle-2)
+   (asdf::delete-file-if-exists bundle-1)
+   (asdf::delete-file-if-exists bundle-2)
+   (asdf:operate 'asdf:load-fasl-op :test-bundle-2)
+   ;; Check that the bundles were indeed created.
+   (assert (probe-file bundle-1))
+   (assert (probe-file bundle-2))
+   ;; Check that the files were indeed loaded.
+   (assert (symbol-value (asdf::find-symbol* :*file1* :test-package)))
+   (assert (symbol-value (asdf::find-symbol* :*file3* :test-package)))))
diff --git a/test/test5.asd b/test/test5.asd
deleted file mode 100644
index 0f9e7437..00000000
--- a/test/test5.asd
+++ /dev/null
@@ -1,9 +0,0 @@
-;;; -*- Lisp -*-
-(asdf:defsystem test5
-  :components
-  ((:module "deps"
-            :pathname "."
-            :components
-            ((:file "file1")
-             (:file "file2" :load-only-p t)))))
-
diff --git a/test/test5.not-implemented b/test/test5.not-implemented
deleted file mode 100644
index cf06f133..00000000
--- a/test/test5.not-implemented
+++ /dev/null
@@ -1,15 +0,0 @@
-;;; -*- Lisp -*-
-
-;;; test :load-only-p support
-
-(load "script-support")
-(load "../asdf")
-(exit-on-error
- (asdf:run-shell-command "rm ~A ~A"
-			 (namestring (compile-file-pathname "file1"))
-			 (namestring (compile-file-pathname "file2")))
- (setf asdf:*central-registry* '(*default-pathname-defaults*))
- (asdf:oos 'asdf:load-op 'test5)
- (assert (probe-file (compile-file-pathname "file1")))
- (assert (not (probe-file (compile-file-pathname "file2"))))
- )
\ No newline at end of file
-- 
GitLab