test event loop in background
test.lisp
Sat Jun 6 17:07:40 CEST 2009 Tobias Rautenkranz <tobias@rautenkranz.ch>
* test event loop in background
--- old-repl/test.lisp 1970-01-01 01:00:00.000000000 +0100
+++ new-repl/test.lisp 2014-10-30 08:04:00.000000000 +0100
@@ -0,0 +1,38 @@
+;;; sbcl < test.lisp
+;;;
+;;; somehow #'LOADing the test file hangs WITH-APP!?
+;;; Thus the pipe
+;;;
+
+(in-package :sysdef-user)
+
+(defun load-sysdef (pathname system)
+ (load pathname)
+ (setf (mb.sysdef::pathname-of (find-system system)) pathname))
+
+(defun load-sysdef-file (system-name)
+ "Loads a mbd file in the current directory."
+ (load-sysdef (first (directory "*.mbd"))
+ system-name))
+
+(load-sysdef-file :cl-smoke.repl)
+(mb:load :cl-smoke.repl)
+
+(in-package :cl-smoke.repl)
+
+(defun test-event-loop-in-background ()
+ (start-event-loop-in-background)
+ (qt-eval '(defvar *w* (make-instance 'qt:push-button)))
+ (qt-eval '(cxx:show *w*))
+ (qt-eval '(setf (cxx:text *w*) "Hello World!"))
+ (qt-eval '(assert (string= "Hello World!" (cxx:text *w*))))
+ (qt-eval '(cxx:adjust-size *w*))
+ (qt-eval '(in-package :smoke))
+ (qt-eval '(assert (eql (find-package :smoke) *package*)))
+ (qt-eval '(end-event-loop)))
+
+(test-event-loop-in-background)
+
+(print "success")
+
+(sb-ext:quit)