Fix some case issues for case-sensitive, modern-mode Allegro
authorKevin Rosenberg <kevin@rosenberg.net>
Sat, 6 Feb 2010 05:37:12 +0000 (22:37 -0700)
committerKevin Rosenberg <kevin@rosenberg.net>
Sat, 6 Feb 2010 05:37:12 +0000 (22:37 -0700)
tests/test-oodml.lisp
tests/test-time.lisp

index 6ab648a03ac1c30ff2a3adc0ca57af96519295fb..978d1fd732d6abefa6e6c76e1db47abc394e9e33 100644 (file)
@@ -1,7 +1,6 @@
 ;;;; -*- Mode: LISP; Syntax: ANSI-Common-Lisp; Base: 10 -*-
 ;;;; ======================================================================
 ;;;; File:    test-oodml.lisp
-;;;; Author:  Marcus Pearce <m.t.pearce@city.ac.uk>
 ;;;; Created: 01/04/2004
 ;;;;
 ;;;; Tests for the CLSQL Object Oriented Data Definition Language
                 (format nil "~a ~a ~a"
                         (slot-value node 'setting-id)
                         (slot-value node 'title)
-                        (slot-value node 'vars)))))
+                        (or (slot-value node 'vars) "NIL")))))
        (values
          (print-fresh-setting)
          (let ((node (car (clsql:select 'setting
                 (with-slots (node-id setting-id theme-id title vars doc) node
                   (format nil "~a ~a ~a ~a ~a ~a"
                           node-id setting-id theme-id
-                          title vars doc)))))
+                          title (or vars "NIL") doc)))))
        (values
          (print-fresh-theme)
          (let ((node (car (clsql:select 'setting
          (format out "~a ~a ~a ~a"
                  (slot-value theme2 'theme-id)
                  (slot-value theme2 'title)
-                 (slot-value theme2 'vars)
+                 (or (slot-value theme2 'vars) "NIL")
                  (slot-value theme2 'doc)))
        (progn
          (clsql:update-records [node] :av-pairs '(([title] "Altered title"))
                                   :doc "test-doc")))
          (setf (slot-value inst 'title) "alternate-test-theme")
          (format nil "~a ~a ~a ~a"
-                 (select [title] :from [node]
-                         :where [= [title] "test-theme"]
-                         :flatp t :field-names nil)
-                 (select [vars] :from [setting]
-                         :where [= [vars] "test-vars"]
-                         :flatp t :field-names nil)
-                 (select [doc] :from [theme]
-                         :where [= [doc] "test-doc"]
-                         :flatp t :field-names nil)
-                 (select [title] :from [node]
-                         :where [= [title] "alternate-test-theme"]
-                         :flatp t :field-names nil)))
+                 (or (select [title] :from [node]
+                              :where [= [title] "test-theme"]
+                              :flatp t :field-names nil) "NIL")
+                 (or (select [vars] :from [setting]
+                              :where [= [vars] "test-vars"]
+                              :flatp t :field-names nil) "NIL")
+                 (or (select [doc] :from [theme]
+                              :where [= [doc] "test-doc"]
+                              :flatp t :field-names nil) "NIL")
+                 (or (select [title] :from [node]
+                              :where [= [title] "alternate-test-theme"]
+                              :flatp t :field-names nil) "NIL")))
        (let* ((*db-auto-sync* t)
               (inst (make-instance 'theme
                                    :title "test-theme" :vars "test-vars"
          (setf (slot-value inst 'title) "alternate-test-theme")
          (prog1
              (format nil "~a ~a ~a ~a"
-                     (select [title] :from [node]
-                             :where [= [title] "test-theme"]
-                             :flatp t :field-names nil)
-                     (select [vars] :from [setting]
-                             :where [= [vars] "test-vars"]
-                             :flatp t :field-names nil)
-                     (select [doc] :from [theme]
-                             :where [= [doc] "test-doc"]
-                             :flatp t :field-names nil)
-                     (select [title] :from [node]
-                             :where [= [title] "alternate-test-theme"]
-                             :flatp t :field-names nil))
+                     (or (select [title] :from [node]
+                                  :where [= [title] "test-theme"]
+                                  :flatp t :field-names nil) "NIL")
+                     (or (select [vars] :from [setting]
+                                  :where [= [vars] "test-vars"]
+                                  :flatp t :field-names nil) "NIL")
+                     (or (select [doc] :from [theme]
+                                  :where [= [doc] "test-doc"]
+                                  :flatp t :field-names nil) "NIL")
+                     (or (select [title] :from [node]
+                                  :where [= [title] "alternate-test-theme"]
+                                  :flatp t :field-names nil) "NIL"))
            (delete-records :from [node] :where [= [title] "alternate-test-theme"])
            (delete-records :from [setting] :where [= [vars] "test-vars"])
            (delete-records :from [theme] :where [= [doc] "test-doc"])))))
index bf2085e9235ac17d897a22541e03f3b2796bb761..050e07fd380d3e9263c8f47f0795bac233ba720d 100644 (file)
                                  :values (list time))
        (let ((testtime
               (first (clsql:select [testtime]
-                                   :from [datetest] :flatp T
+                                   :from [datetest] :flatp t
                                    :where [= [testtime] time] ))))
          (format-time nil (parse-timestring testtime) :format :iso)
          )))
                                  :values (list time))
        (let ((testtime
               (first (clsql:select [testtime]
-                                   :from [datetest] :flatp T
+                                   :from [datetest] :flatp t
                                    :where [= [testtime] time] ))))
          (format-time nil (parse-timestring testtime) :format :iso)
          )))
                                  :values (list time))
        (let ((testtime
               (first (clsql:select [testtime]
-                                   :from [datetest] :flatp T
+                                   :from [datetest] :flatp t
                                    :where [= [testtime] time] ))))
          (format-time nil (parse-timestring testtime) :format :iso)
          )))
                                  :values (list time))
        (let ((testtime
               (first (clsql:select [testtime]
-                                   :from [datetest] :flatp T
+                                   :from [datetest] :flatp t
                                    :where [= [testtime] time] ))))
          (format-time nil (parse-timestring testtime) :format :iso)
          )))
        (let ((testtime
               (first (clsql:select [testtime]
                                    :from [datetest]
-                                   :limit 1 :flatp T
+                                   :limit 1 :flatp t
                                    :where [= [testtime] time] ))))
          (format-time nil (parse-timestring testtime) :format :iso)
          )))
       (destructuring-bind (testtimetz testtime)
          (first (clsql:select [testtimetz] [testtime]
                               :from [datetest]
-                              :limit 1 :flatp T
+                              :limit 1 :flatp t
                               :where [= [testtime] time] ))
        (values (iso-timestring (parse-timestring testtime))
                (iso-timestring (parse-timestring testtimetz))))))
        (make-instance 'datetest :testtimetz time :testtime time))
       (let ((o (first (clsql:select
                          'datetest
-                       :limit 1 :flatp T
+                       :limit 1 :flatp t
                        :where [= [testtime] time] ))))
        (assert o (o) "o shouldnt be null here (we should have just inserted)")
        (update-records-from-instance o)
         (make-instance 'datetest :testtimetz time :testtime time))
        (let ((o (first (clsql:select
                         'datetest
-                        :limit 1 :flatp T
+                        :limit 1 :flatp t
                         :where [= [testtime] time] ))))
          (assert o (o) "o shouldnt be null here (we should have just inserted)")
          (update-records-from-instance o)