lurking / lurking-lisp-library / t / op-equal-sign.lisp

;;; The following lines added by ql:add-to-init-file:
(let ((quicklisp-init (merge-pathnames "quicklisp/setup.lisp"
  (when (probe-file quicklisp-init)
    (load quicklisp-init)))

(ql:quickload "testbild")

(use-package 'testbild)
(load "lurking.lisp")

(defun concat-uc (x y)
  (concatenate 'string x (string-upcase y)))

(op2assign concat-uc)

(let ((producer (make-instance 'tap-producer)))
  (init-test producer)
  (emit-plan producer :plan-argument 5) ; simple plan, three tests planned
  (let ((result 28))
    (-= result 4)
    ; TEST
    (emit-result producer :success (= result 24) :description "Test -=")
    (*= result 2)
    ; TEST
    (emit-result producer :success (= result 48) :description "Test *=")

    ; TEST
    (emit-result producer :success (equal (concat-uc "foo " "bar") "foo BAR")
                 :description "Testing concat-uc"))

  (let ((string1 "Start "))
    ; TEST
    (concat-uc= string1 "end")
    (emit-result producer :success (equal string1 "Start END")
                 :description "Testing op2assign directly"))

  ; TEST
  (emit-result producer :success (equal (~ "One" "Two" "Three") "OneTwoThree")
               :description "Testing the ~ function for string concatenation.")

  (finalize-test producer))
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.