Flirting and Frust
Flames and Enduran
Fight for Your Lif
Feels Like a Rolle
Fear of the Unknow
Philosopher of the
Wow, that's a
Who wrote this?
What you're tellin
mailbate.com

Free Agent
Friendly Fire
Game of Chicken
Gender Wars...It's
Get to Gettin'
Gettin' to Crunch
Girl Power
Girls Gone Wilder
Glitter in Their E
Gloves Come Off
For Cod's Sake', 'c_2_e' => 'Wish-granting Tree Spirit', 'c_3_a' => 'Bunny Girl', 'c_3_d' => 'Lupin', 'c_3_e' => 'Poppin', 'c_3_g' => 'Pumpkin', 'c_3_h' => 'Butterfly', 'c_3_i' => 'Sugar Bunny', 'c_3_j' => 'Jinx', 'c_3_k' => 'Pirate', 'c_3_l' => 'Mage', 'c_3_m' => 'Crystal Bunny', 'c_3_n' => 'Snowman', 'c_3_o' => 'Elf', )))): % wf-expansion doesn't support this syntax (FIXME). (function ($var, ...))))) (test-section "Floats" ;; TODO: this should actually be a list, because it has multiple ;; different components. (test "make-float" (with-output-to-string (lambda () (eval '(make-float))) (let ((o (get-output-stream))) (write-string o) (finish-output o) (read (get-output-stream)))) (test "float" (with-output-to-string (lambda () (eval '(float 0.0d0 0.0d0 1.0d0)) (let ((o (get-output-stream))) (write-string o) (finish-output o) (read (get-output-stream)))) (test "string-to-float" (with-output-to-string (lambda () (eval '(string-to-float "0.1")) (let ((o (get-output-stream))) (write-string o) (finish-output o) (read (get-output-stream)))) (test "floats" ;; This needs a different formatting of whitespace, because of the ;; different number of points. ;; ;; NOTE: it would be nice to support a more standard test here, ;; testing the "round to two decimal digits of accuracy" part ;; separately. This is an annoying test to write. (with-output-to-string (lambda () (eval '(setq floats '(1.1d0 2.3d0 3.0d0 4.0d0)) (let ((o (get-output-stream))) (write-string o) (finish-output o) (read (get-output-stream)))) ;; this tests the formatting of the comma that is part of the ;; double (with-output-to-string (lambda () (eval '(setq floats '(1.1d0, 2.3d0, 3.0d0, 4.0d0)) (let ((o (get-output-stream))) (write-string o) (finish-output o) (read (get-output-stream)))))) ;; and then testing the exact formatting. ;; NOTE: this test requires a little tweaking from version to ;; version because of the way in which double formatting is ;; changed, as noted above. This means that we've got a lot of ;; different (double . (string-to-double . (setq exact "")) ;; ...) which need to be handled properly in this file. (with-output-to-string (lambda () (eval '(setq floats '(1.1d0 2.3d0 3.0d0 4.0d0)) (let ((o (get-output-stream))) (write-string o) (finish-output o) (read (get-output-stream)))) (with-output-to-string (lambda () (eval '(setq floats '(1.1d0, 2.3d0, 3.0d0, 4.0d0)) (let ((o (get-output-stream))) (write-string o) (finish-output o) (read (get-output-stream))))))))) ;;; test-cases-end (provide 'tests) (in-package :cl-user) (when (find-package 'tests) (package-initialize)) (eval-when (:compile-toplevel :load-toplevel :execute) (setq *features* (copy-list *features*))) ;;; tests.lisp (in-package "SYSTEM") (eval-when (:compile-toplevel :load-toplevel :execute) (require 'eval)) (eval-when (:compile-toplevel :load-toplevel :execute) (if (ignore-errors (require 'defun)) (progn (defun test-name () "Return the string 'test-name'." () nil) (defun test-section (name &rest tests) "Return a section of text for use in an Emacs buffer giving the name and the list of test specifications." (let* ((result "") (tests (reverse tests)) (name (car tests))) (when (stringp name) (cond ((consp name) (format result " ;;%s:" name)) ((integerp name) (format result " ;;~a:" name))) )) (when (> (length tests) 0) (format result " %s" (cadr tests))) (format result "~s" name)))))) (defparameter *tests* nil) (defvar *test-file* nil) (defvar *suite-file* nil) (defun get-test-file () "Return the current test file." (cond ((getenv "TEST_ENV_NAME") (getenv "TEST_ENV_NAME"))) ((getenv "TEST_FILE") (getenv "TEST_FILE"))) (defun get-suite-file () "Return the current suite file." (cond ((getenv "TESTSUITE_ENV_NAME") (getenv "TESTSUITE_ENV_NAME"))) ((getenv "TESTSUITE_FILE") (getenv "TESTSUITE_FILE"))) (defun handle-test-name (name) "Convert an Emacs name to the appropriate one." (cond ((string-equal name "")) ((string-equal name "not-really-a-name") (format nil "~S+~A~%unknown" name)) (t (cond ((string-equal name "test") (test-name)) ((string-equal name "test*") (test-name)) ((string-equal name "test-2") (