1 ;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10; Package: umlisp -*-
2 ;;;; *************************************************************************
3 ;;;; FILE IDENTIFICATION
6 ;;;; Purpose: Parsing tests for UMLisp
7 ;;;; Author: Kevin M. Rosenberg
8 ;;;; Date Started: May 2003
12 ;;;; This file, part of UMLisp, is
13 ;;;; Copyright (c) 2000-2002 by Kevin M. Rosenberg, M.D.
15 ;;;; UMLisp users are granted the rights to distribute and use this software
16 ;;;; as governed by the terms of the GNU General Public License.
17 ;;;; *************************************************************************
19 (in-package #:umlisp-tests)
21 (eval-when (:compile-toplevel :load-toplevel :execute)
22 (import '(umlisp::*umls-files* umlisp::*umls-cols*)))
27 (umlisp::decompose-fil "abc")
31 (umlisp::decompose-fil "dir/abc")
35 (umlisp::decompose-fil nil)
39 (umlisp::filename-to-tablename "test")
43 (umlisp::filename-to-tablename "TEST.AB.RRF")
46 ;; specific for UMLS2007AA
47 (when (probe-file (umlisp::umls-pathname "MRFILES.RRF"))
48 (umlisp::ensure-ucols+ufiles)
54 (deftest uparse.1 (length *umls-files*) 63)
55 (deftest uparse.2 (length *umls-cols*) 452)
57 (sort (mapcar #'u::col (umlisp::ucols (umlisp::find-ufile "MRCONSO.RRF")))
59 ("AUI" "CODE" "CUI" "CVF" "ISPREF" "KCUILRL" "KCUILUI" "KCUISUI" "KLUILRL"
60 "KPFENG" "KSUILRL" "LAT" "LUI" "SAB" "SAUI" "SCUI" "SDUI" "SRL" "STR" "STT"
61 "SUI" "SUPPRESS" "TS" "TTY"))
64 (sort (mapcar #'u::col (umlisp::ucols (umlisp::find-ufile "MRCONSO.RRF")))
66 (sort (copy-seq (umlisp::fields (umlisp::find-ufile "MRCONSO.RRF")))
71 (umlisp::custom-colnames-for-filename "MRCONSO.RRF")
73 ("KCUILRL" "KCUILUI" "KCUISUI" "KLUILRL" "KPFENG" "KSUILRL"))
76 (umlisp::custom-value-fun
77 (umlisp::find-ucol "KCUISUI" "MRCONSO.RRF")))