From 7761fd2dd0d16b279543e0b71626be59383205f4 Mon Sep 17 00:00:00 2001
From: Gary King <gwking@metabang.com>
Date: Thu, 19 Jun 2008 03:42:26 +0000
Subject: [PATCH] Added test8 and test9 to check for changes in
 missing-component and missing-dependency handling.

---
 test/run-tests.sh |  2 +-
 test/test8.script | 19 +++++++++++++++++++
 test/test9-1.asd  |  7 +++++++
 test/test9-2.asd  |  6 ++++++
 test/test9.script | 20 ++++++++++++++++++++
 5 files changed, 53 insertions(+), 1 deletion(-)
 create mode 100644 test/test8.script
 create mode 100644 test/test9-1.asd
 create mode 100644 test/test9-2.asd
 create mode 100644 test/test9.script

diff --git a/test/run-tests.sh b/test/run-tests.sh
index 451f380d..231c1292 100644
--- a/test/run-tests.sh
+++ b/test/run-tests.sh
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-# do_tests {lisp invocation} {fasl extension}
+# do_tests {lisp invocation} {scripts-regex}
 # - read lisp forms one at a time from standard input
 # - quit with exit status 0 on getting eof
 # - quit with exit status >0 if an unhandled error occurs
diff --git a/test/test8.script b/test/test8.script
new file mode 100644
index 00000000..9950420d
--- /dev/null
+++ b/test/test8.script
@@ -0,0 +1,19 @@
+;;; -*- Lisp -*-
+
+;;; make sure we get a missing-component error
+
+(load "script-support")
+(load "../asdf")
+(in-package #:common-lisp-user)
+
+(exit-on-error 
+ (setf asdf:*central-registry* '(*default-pathname-defaults*))
+ (handler-case 
+     (asdf:oos 'asdf:load-op 'system-does-not-exist)
+   (asdf:missing-component-of-version (c)
+     (error "Should not have gotten 'missing-component-of-version, dang"))
+   (asdf:missing-component (c)
+     (format t "got missing-component as expected: - ~%~A~%" c))
+   (:no-error (c) (error "should have failed, oops"))))
+
+
diff --git a/test/test9-1.asd b/test/test9-1.asd
new file mode 100644
index 00000000..d6378a7e
--- /dev/null
+++ b/test/test9-1.asd
@@ -0,0 +1,7 @@
+;;; -*- Lisp -*-
+(asdf:defsystem test9-1
+    :version "1.1"
+    :components ((:file "file1"))
+    :depends-on ((:version :test9-2 "2.0")))
+
+
diff --git a/test/test9-2.asd b/test/test9-2.asd
new file mode 100644
index 00000000..20f6b8b5
--- /dev/null
+++ b/test/test9-2.asd
@@ -0,0 +1,6 @@
+;;; -*- Lisp -*-
+(asdf:defsystem test9-2
+    :version "1.0"
+    :components ((:file "file2")))
+
+
diff --git a/test/test9.script b/test/test9.script
new file mode 100644
index 00000000..bec42e76
--- /dev/null
+++ b/test/test9.script
@@ -0,0 +1,20 @@
+;;; -*- Lisp -*-
+
+;;; make sure we get a missing-component-of-version error
+
+(load "script-support")
+(load "../asdf")
+(in-package #:common-lisp-user)
+
+(exit-on-error 
+ (setf asdf:*central-registry* nil)
+ (load (merge-pathnames "test9-1.asd"))
+ (load (merge-pathnames "test9-2.asd"))
+ (handler-case 
+     (asdf:oos 'asdf:load-op 'test9-1)
+   (asdf:missing-component-of-version (c)
+     (format t "got missing-component-of-version as expected: - ~%~A~%" c))
+   (:no-error (c) (error "should have failed, oops"))))
+
+
+
-- 
GitLab