X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=tests%2Fparse.lisp;h=83282228de069e6dc07e6909024b65e85e7c6004;hb=45453f00199223924481c8d6d614972a327a250f;hp=e1dcd3013cbdba1828ea733cc15ee68120464aeb;hpb=f761dc1d39bb92917db53f935348f79e4db95e40;p=umlisp.git diff --git a/tests/parse.lisp b/tests/parse.lisp index e1dcd30..8328222 100644 --- a/tests/parse.lisp +++ b/tests/parse.lisp @@ -7,7 +7,7 @@ ;;;; Author: Kevin M. Rosenberg ;;;; Date Started: May 2003 ;;;; -;;;; $Id: parse.lisp,v 1.1 2003/05/07 23:06:44 kevin Exp $ +;;;; $Id: parse.lisp,v 1.3 2003/05/08 04:36:12 kevin Exp $ ;;;; ;;;; This file, part of UMLisp, is ;;;; Copyright (c) 2000-2002 by Kevin M. Rosenberg, M.D. @@ -17,3 +17,41 @@ ;;;; ************************************************************************* (in-package #:umlisp-tests) + +(eval-when (:compile-toplevel :load-toplevel :execute) + (if (probe-file (umlisp::umls-pathname "MRFILES")) + (pushnew :umls-files cl:*features*) + (format t "~&Skipping tests based on UMLS distribution~%"))) + +(import '(umlisp::*umls-files* umlisp::*umls-cols*)) + +#+umls-files +(progn + (umlisp::ensure-ucols+ufiles) + (deftest uparse.1 (length *umls-files*) 52) + (deftest uparse.2 (length *umls-cols*) 327) + (deftest uparse.3 + (sort (mapcar #'u::col (umlisp::ucols (umlisp::find-ufile "MRCON"))) + #'string<) + ("CUI" "KCUILRL" "KCUILUI" "KCUISUI" "KLUILRL" "KPFSTR" "LAT" "LRL" "LUI" "STR" + "STT" "SUI" "TS")) + (deftest uparse.4 + (sort (umlisp::fields (umlisp::find-ufile "MRCON")) + #'string<) + ("CUI" "KCUILRL" "KCUILUI" "KCUISUI" "KLUILRL" "KPFSTR" "LAT" "LRL" "LUI" "STR" + "STT" "SUI" "TS")) + (deftest uparse.5 + (sort + (umlisp::custom-colnames-for-filename "MRCON") + #'string<) + ("KCUILRL" "KCUILUI" "KCUISUI" "KLUILRL" "KPFSTR")) + (deftest uparse.6 + (compiled-function-p + (umlisp::custom-value-fun + (umlisp::find-ucol "KCUISUI" "MRCON"))) + t) + ) ;; umls-files + +#+umls-files +(setq cl:*features* (delete :umls-files cl:*features*)) +