X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=tests%2Fgetenv.cl;h=b3d620ec13648fdda2f41a483dc03de771a4cc83;hb=acdc714a0b8ea9c0df0c9ffc56699fa010bd549e;hp=1241117c552f364c57cde0f7d050d1f965d14865;hpb=bf5c7e7c36474375604bcbcedea8794a68dd1784;p=uffi.git diff --git a/tests/getenv.cl b/tests/getenv.cl index 1241117..b3d620e 100644 --- a/tests/getenv.cl +++ b/tests/getenv.cl @@ -7,7 +7,7 @@ ;;;; 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 ;;;; @@ -29,10 +29,19 @@ (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") +) +