r1524: *** empty log message ***
authorKevin M. Rosenberg <kevin@rosenberg.net>
Sun, 10 Mar 2002 04:15:33 +0000 (04:15 +0000)
committerKevin M. Rosenberg <kevin@rosenberg.net>
Sun, 10 Mar 2002 04:15:33 +0000 (04:15 +0000)
16 files changed:
Makefile
doc/uffi.pdf
examples/compress.cl
examples/getenv.cl
examples/gethostname.cl
examples/getshells.cl
examples/gettime.cl
examples/strtol.cl
examples/test-all-examples.cl [new file with mode: 0644]
tests/compress.cl
tests/getenv.cl
tests/gethostname.cl
tests/getshells.cl
tests/gettime.cl
tests/strtol.cl
tests/test-all-examples.cl [new file with mode: 0644]

index aff1142bb47b39a39ec3c6bce5838c4dd6d3f49f..49a4354aee675e05d01ad0a0175cc954e47bb46e 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -5,7 +5,7 @@
 #  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
 #
@@ -41,7 +41,7 @@ realclean: clean
 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
index 943df2df1c211d307322ea02115a44a1a29ebff9..f100f7076d05ee9d91ee0251097203ca48bcaee3 100644 (file)
Binary files a/doc/uffi.pdf and b/doc/uffi.pdf differ
index 7787b69939d001a512ecc31684d69426eb93c3e7..1ef513db8adde6bf4ae8d5ff595159db9a56fe52 100644 (file)
@@ -9,7 +9,7 @@
 ;;;;
 ;;;; 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")))
index 335a70f694011010847e5cbea87951e2e76242c6..347a22f81b12c461c7ce0836d293c160caa7b4b8 100644 (file)
@@ -9,7 +9,7 @@
 ;;;;
 ;;;; 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_")))
+
index 0b3ceda7820c3c3102714acdabf3bd7aa5a82ce8..fbb3539a6230914c3bd717bc992ece1e95c4f292 100644 (file)
@@ -9,7 +9,7 @@
 ;;;;
 ;;;; 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. 
 ;;;;
@@ -47,5 +47,6 @@
          (error "gethostname() failed."))
       (uffi:free-foreign-object name))))
     
+#+test-uffi
 (format t "~&Hostname: ~A" (gethostname))
 
index 58e10202f4b2d53302ac7c15ecfaf1436f35cdb7..50040ec99b4db81dd1e352f7286256b18cedffea 100644 (file)
@@ -9,7 +9,7 @@
 ;;;;
 ;;;; 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. 
 ;;;;
@@ -52,6 +52,7 @@
       (push shell shells))
     (endusershell)
     (nreverse shells)))
-    
+
+#+test-uffi
 (format t "~&Shells: ~S" (getshells))
 
index ea71edcd1badab116e7f38a4f12668b287ea4505..be0bdee36ddf6be971ae2ca89f4d25574c31b9cd 100644 (file)
@@ -9,7 +9,7 @@
 ;;;;
 ;;;; 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. 
 ;;;;
@@ -66,7 +66,8 @@
       (uffi:free-foreign-object time)
       time-string)
     ))
-    
+
+#+test-uffi
 (format t "~&~A" (gettime))
 
 
index 3655dd0d62a5a226cd9a8b05c6b1df862162e33f..d813f1333173b416c20f976d76cfce96813caaf6 100644 (file)
@@ -9,7 +9,7 @@
 ;;;;
 ;;;; 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. 
 ;;;;
@@ -63,3 +63,13 @@ of first non-valid character"
      (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")))
+
diff --git a/examples/test-all-examples.cl b/examples/test-all-examples.cl
new file mode 100644 (file)
index 0000000..a2a62de
--- /dev/null
@@ -0,0 +1,18 @@
+(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*))
+
+
+      
index 7787b69939d001a512ecc31684d69426eb93c3e7..1ef513db8adde6bf4ae8d5ff595159db9a56fe52 100644 (file)
@@ -9,7 +9,7 @@
 ;;;;
 ;;;; 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")))
index 335a70f694011010847e5cbea87951e2e76242c6..347a22f81b12c461c7ce0836d293c160caa7b4b8 100644 (file)
@@ -9,7 +9,7 @@
 ;;;;
 ;;;; 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_")))
+
index 0b3ceda7820c3c3102714acdabf3bd7aa5a82ce8..fbb3539a6230914c3bd717bc992ece1e95c4f292 100644 (file)
@@ -9,7 +9,7 @@
 ;;;;
 ;;;; 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. 
 ;;;;
@@ -47,5 +47,6 @@
          (error "gethostname() failed."))
       (uffi:free-foreign-object name))))
     
+#+test-uffi
 (format t "~&Hostname: ~A" (gethostname))
 
index 58e10202f4b2d53302ac7c15ecfaf1436f35cdb7..50040ec99b4db81dd1e352f7286256b18cedffea 100644 (file)
@@ -9,7 +9,7 @@
 ;;;;
 ;;;; 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. 
 ;;;;
@@ -52,6 +52,7 @@
       (push shell shells))
     (endusershell)
     (nreverse shells)))
-    
+
+#+test-uffi
 (format t "~&Shells: ~S" (getshells))
 
index ea71edcd1badab116e7f38a4f12668b287ea4505..be0bdee36ddf6be971ae2ca89f4d25574c31b9cd 100644 (file)
@@ -9,7 +9,7 @@
 ;;;;
 ;;;; 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. 
 ;;;;
@@ -66,7 +66,8 @@
       (uffi:free-foreign-object time)
       time-string)
     ))
-    
+
+#+test-uffi
 (format t "~&~A" (gettime))
 
 
index 3655dd0d62a5a226cd9a8b05c6b1df862162e33f..d813f1333173b416c20f976d76cfce96813caaf6 100644 (file)
@@ -9,7 +9,7 @@
 ;;;;
 ;;;; 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. 
 ;;;;
@@ -63,3 +63,13 @@ of first non-valid character"
      (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")))
+
diff --git a/tests/test-all-examples.cl b/tests/test-all-examples.cl
new file mode 100644 (file)
index 0000000..a2a62de
--- /dev/null
@@ -0,0 +1,18 @@
+(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*))
+
+
+