clem 0.4.1, ch-asdf 0.2.8, ch-util 0.2.2, lift 1.3.1, darcs ignored, smarkup 0.3.3
[CommonLispStat.git] / external / ch-util / test / test-ch-util.cl
blob9de5b225b1c0400ce3d99de104e84d864acbf082
2 (in-package #:ch-util-test)
4 (defun test-strcat ()
5 (let ((s1 (strcat "this is " "a test")))
6 (equal s1 "this is a test")))
8 (defun test-interncase ()
9 (let ((s1 (interncase "testINGinternCase")))
10 (format t "~&~A" s1)
11 t))
13 (defun test-print-buffer ()
14 (print-buffer (read-file-to-buffer "/etc/motd"))
17 (defun test-postincf ()
18 (let ((moose 3))
19 (print moose)
20 (print (postincf moose))
21 (print moose)
22 (print (postincf moose 2))
23 (print moose)
26 (defun run-tests ()
27 (let ((run (make-test-run)))
28 (run-test #'test-strcat "test-strcat" run)
29 (run-test #'test-print-buffer "test-print-buffer" run)
30 (run-test #'test-interncase "test-interncase" run)
31 (run-test #'test-postincf "test-postincf" run)
32 (format t "~&~A of ~A tests passed" (test-run-passed run) (test-run-tests run))
35 ;;; Lisp one liners:
37 ; (let ((gstring (with-output-to-string (gstream) (run-program "ls" nil :output gstream)))) (print gstring))