# Programer: Kevin M. Rosenberg, M.D.
# Date Started: Mar 2002
#
-# CVS Id: $Id: Makefile,v 1.5 2002/03/10 00:11:47 kevin Exp $
+# CVS Id: $Id: Makefile,v 1.6 2002/03/10 04:15:33 kevin Exp $
#
# Copyright (c) 2002 by Kevin M. Rosenberg
#
docs:
@(cd doc; make dist-doc)
-VERSION=0.1.3
+VERSION=0.1.4-pre
DISTDIR=uffi-${VERSION}
DIST_TARBALL=${DISTDIR}.tar.gz
DIST_ZIP=${DISTDIR}.zip
;;;;
;;;; Copyright (c) 2002 Kevin M. Rosenberg
;;;;
-;;;; $Id: compress.cl,v 1.2 2002/03/09 21:19:31 kevin Exp $
+;;;; $Id: compress.cl,v 1.3 2002/03/10 04:15:33 kevin Exp $
;;;;
;;;; This file is part of UFFI.
;;;;
(uffi:free-foreign-object dest)))))))
+#+test-uffi
+(progn
+ (flet ((print-results (str)
+ (multiple-value-bind (compressed len) (compress str)
+ (format t "~&(compress ~S) => ~S,~D" str compressed len))))
+ (print-results "")
+ (print-results "test")
+ (print-results "test2")))
;;;;
;;;; Copyright (c) 2002 Kevin M. Rosenberg
;;;;
-;;;; $Id: getenv.cl,v 1.2 2002/03/09 21:19:31 kevin Exp $
+;;;; $Id: getenv.cl,v 1.3 2002/03/10 04:15:33 kevin Exp $
;;;;
;;;; This file is part of UFFI.
;;;;
(format t "~&Environment value for USER key: ~A" (getenv "USER"))
(format t "~&Environment value for _FOO_ key: ~A" (getenv "_FOO_"))
+#+test-uffi
+(progn
+ (flet ((print-results (str)
+ (format t "~&(getenv ~S) => ~S" str (getenv str))))
+ (print-results "USER")
+ (print-results "_FOO_")))
+
;;;;
;;;; Copyright (c) 2002 Kevin M. Rosenberg
;;;;
-;;;; $Id: gethostname.cl,v 1.2 2002/03/09 21:19:31 kevin Exp $
+;;;; $Id: gethostname.cl,v 1.3 2002/03/10 04:15:33 kevin Exp $
;;;;
;;;; This file is part of UFFI.
;;;;
(error "gethostname() failed."))
(uffi:free-foreign-object name))))
+#+test-uffi
(format t "~&Hostname: ~A" (gethostname))
;;;;
;;;; Copyright (c) 2002 Kevin M. Rosenberg
;;;;
-;;;; $Id: getshells.cl,v 1.2 2002/03/09 21:19:31 kevin Exp $
+;;;; $Id: getshells.cl,v 1.3 2002/03/10 04:15:33 kevin Exp $
;;;;
;;;; This file is part of UFFI.
;;;;
(push shell shells))
(endusershell)
(nreverse shells)))
-
+
+#+test-uffi
(format t "~&Shells: ~S" (getshells))
;;;;
;;;; Copyright (c) 2002 Kevin M. Rosenberg
;;;;
-;;;; $Id: gettime.cl,v 1.2 2002/03/09 21:19:31 kevin Exp $
+;;;; $Id: gettime.cl,v 1.3 2002/03/10 04:15:33 kevin Exp $
;;;;
;;;; This file is part of UFFI.
;;;;
(uffi:free-foreign-object time)
time-string)
))
-
+
+#+test-uffi
(format t "~&~A" (gettime))
;;;;
;;;; Copyright (c) 2002 Kevin M. Rosenberg
;;;;
-;;;; $Id: strtol.cl,v 1.2 2002/03/09 21:19:31 kevin Exp $
+;;;; $Id: strtol.cl,v 1.3 2002/03/10 04:15:33 kevin Exp $
;;;;
;;;; This file is part of UFFI.
;;;;
(t
(values value chars-parsed)))))
+
+#+test-uffi
+(progn
+ (flet ((print-results (str)
+ (multiple-value-bind (result flag) (strtol str)
+ (format t "~&(strtol ~S) => ~S,~S" str result flag))))
+ (print-results "55")
+ (print-results "55.3")
+ (print-results "a")))
+
--- /dev/null
+(mk:load-system :uffi)
+
+(pushnew :test-uffi cl:*features*)
+
+(flet ((load-test (name)
+ (load (make-pathname :name name :type "cl" :defaults *load-truename*))))
+
+ (load-test "getenv")
+ (load-test "gethostname")
+ (load-test "getshells")
+ (load-test "gettime")
+ (load-test "strtol")
+ (load-test "compress"))
+
+(setq cl:*features* (remove :test-uffi cl:*features*))
+
+
+
;;;;
;;;; Copyright (c) 2002 Kevin M. Rosenberg
;;;;
-;;;; $Id: compress.cl,v 1.2 2002/03/09 21:19:31 kevin Exp $
+;;;; $Id: compress.cl,v 1.3 2002/03/10 04:15:33 kevin Exp $
;;;;
;;;; This file is part of UFFI.
;;;;
(uffi:free-foreign-object dest)))))))
+#+test-uffi
+(progn
+ (flet ((print-results (str)
+ (multiple-value-bind (compressed len) (compress str)
+ (format t "~&(compress ~S) => ~S,~D" str compressed len))))
+ (print-results "")
+ (print-results "test")
+ (print-results "test2")))
;;;;
;;;; Copyright (c) 2002 Kevin M. Rosenberg
;;;;
-;;;; $Id: getenv.cl,v 1.2 2002/03/09 21:19:31 kevin Exp $
+;;;; $Id: getenv.cl,v 1.3 2002/03/10 04:15:33 kevin Exp $
;;;;
;;;; This file is part of UFFI.
;;;;
(format t "~&Environment value for USER key: ~A" (getenv "USER"))
(format t "~&Environment value for _FOO_ key: ~A" (getenv "_FOO_"))
+#+test-uffi
+(progn
+ (flet ((print-results (str)
+ (format t "~&(getenv ~S) => ~S" str (getenv str))))
+ (print-results "USER")
+ (print-results "_FOO_")))
+
;;;;
;;;; Copyright (c) 2002 Kevin M. Rosenberg
;;;;
-;;;; $Id: gethostname.cl,v 1.2 2002/03/09 21:19:31 kevin Exp $
+;;;; $Id: gethostname.cl,v 1.3 2002/03/10 04:15:33 kevin Exp $
;;;;
;;;; This file is part of UFFI.
;;;;
(error "gethostname() failed."))
(uffi:free-foreign-object name))))
+#+test-uffi
(format t "~&Hostname: ~A" (gethostname))
;;;;
;;;; Copyright (c) 2002 Kevin M. Rosenberg
;;;;
-;;;; $Id: getshells.cl,v 1.2 2002/03/09 21:19:31 kevin Exp $
+;;;; $Id: getshells.cl,v 1.3 2002/03/10 04:15:33 kevin Exp $
;;;;
;;;; This file is part of UFFI.
;;;;
(push shell shells))
(endusershell)
(nreverse shells)))
-
+
+#+test-uffi
(format t "~&Shells: ~S" (getshells))
;;;;
;;;; Copyright (c) 2002 Kevin M. Rosenberg
;;;;
-;;;; $Id: gettime.cl,v 1.2 2002/03/09 21:19:31 kevin Exp $
+;;;; $Id: gettime.cl,v 1.3 2002/03/10 04:15:33 kevin Exp $
;;;;
;;;; This file is part of UFFI.
;;;;
(uffi:free-foreign-object time)
time-string)
))
-
+
+#+test-uffi
(format t "~&~A" (gettime))
;;;;
;;;; Copyright (c) 2002 Kevin M. Rosenberg
;;;;
-;;;; $Id: strtol.cl,v 1.2 2002/03/09 21:19:31 kevin Exp $
+;;;; $Id: strtol.cl,v 1.3 2002/03/10 04:15:33 kevin Exp $
;;;;
;;;; This file is part of UFFI.
;;;;
(t
(values value chars-parsed)))))
+
+#+test-uffi
+(progn
+ (flet ((print-results (str)
+ (multiple-value-bind (result flag) (strtol str)
+ (format t "~&(strtol ~S) => ~S,~S" str result flag))))
+ (print-results "55")
+ (print-results "55.3")
+ (print-results "a")))
+
--- /dev/null
+(mk:load-system :uffi)
+
+(pushnew :test-uffi cl:*features*)
+
+(flet ((load-test (name)
+ (load (make-pathname :name name :type "cl" :defaults *load-truename*))))
+
+ (load-test "getenv")
+ (load-test "gethostname")
+ (load-test "getshells")
+ (load-test "gettime")
+ (load-test "strtol")
+ (load-test "compress"))
+
+(setq cl:*features* (remove :test-uffi cl:*features*))
+
+
+