;;;; Programmer: Kevin M. Rosenberg
;;;; Date Started: Feb 2002
;;;;
-;;;; $Id: getenv.cl,v 1.7 2002/03/14 21:03:12 kevin Exp $
+;;;; $Id: getenv.cl,v 1.9 2002/04/02 23:27:05 kevin Exp $
;;;;
;;;; This file, part of UFFI, is Copyright (c) 2002 by Kevin M. Rosenberg
;;;;
(uffi:with-cstring (key-native key)
(uffi:convert-from-cstring (c-getenv key-native))))
-#+test-uffi
+#+examples-uffi
(progn
(flet ((print-results (str)
(format t "~&(getenv ~S) => ~S" str (my-getenv str))))
(print-results "USER")
(print-results "_FOO_")))
+
+#+test-uffi
+(progn
+ (util.test:test (my-getenv "_FOO_") nil :fail-info "Error retrieving non-existent getenv")
+ (util.test:test (and (stringp (my-getenv "USER"))
+ (< 0 (length (my-getenv "USER"))))
+ t :fail-info "Error retrieving getenv")
+)
+