r4740: *** empty log message ***
[umlisp.git] / tests.lisp
diff --git a/tests.lisp b/tests.lisp
new file mode 100644 (file)
index 0000000..fdc1748
--- /dev/null
@@ -0,0 +1,47 @@
+;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10; Package: umlisp -*-
+;;;; *************************************************************************
+;;;; FILE IDENTIFICATION
+;;;;
+;;;; Name:          tests.lisp
+;;;; Purpose:       Regression suite for UMLisp
+;;;; Author:        Kevin M. Rosenberg
+;;;; Date Started:  May 2003
+;;;;
+;;;; $Id: tests.lisp,v 1.1 2003/05/02 18:47:53 kevin Exp $
+;;;;
+;;;; This file, part of UMLisp, is
+;;;;    Copyright (c) 2000-2002 by Kevin M. Rosenberg, M.D.
+;;;;
+;;;; UMLisp users are granted the rights to distribute and use this software
+;;;; as governed by the terms of the GNU General Public License.
+;;;; *************************************************************************
+
+(defpackage #:umlisp-tests
+  (:use #:umlisp #:cl #:rtest))
+(in-package #:umlisp-tests)
+
+(setf rtest::*catch-errors* nil)
+
+(rem-all-tests)
+
+(deftest qs.1 (umlisp::query-string 'mrcon '(cui lui))
+  "select CUI,LUI from MRCON")
+
+(deftest qs.2 (umlisp::query-string 'mrcon '(cui lui) 0)
+  "select CUI,LUI from MRCON and KCUILRL <= 0")
+
+(deftest qs.3 (umlisp::query-string 'mrcon '(cui lui) nil 'cui 5)
+  "select CUI,LUI from MRCON where CUI=5")
+
+(deftest qs.4 (umlisp::query-string 'mrcon '(cui lui) nil 'kpfstr "Abc")
+  "select CUI,LUI from MRCON where KPFSTR='Abc'")
+
+(deftest qs.5 (umlisp::query-string 'mrcon '(cui lui) 2 'cui 5 "limit 1")
+  "select CUI,LUI from MRCON where CUI=5 and KCUILRL <= 2 limit 1")
+
+(deftest qs.6 (umlisp::query-string 'mrdef '(sab def) 2 'cui 39 'srl "limit 1")
+  "select SAB,DEF from MRDEF where CUI=39 and KSRL <= 2 limit 1")
+
+
+
+