33 lines
1.1 KiB
Common Lisp
33 lines
1.1 KiB
Common Lisp
;;;; cl-scopes/test-steps - testing for the scopes-steps system.
|
|
|
|
(defpackage :scopes/test-steps
|
|
(:use :common-lisp)
|
|
(:local-nicknames (:config :scopes/config)
|
|
(:steps :scopes/steps)
|
|
(:util :scopes/util)
|
|
(:t :scopes/testing))
|
|
(:export #:run #:user #:password)
|
|
(:import-from :scopes/testing #:deftest #:==))
|
|
|
|
(in-package :scopes/test-steps)
|
|
|
|
(defvar *config* nil)
|
|
|
|
(defclass test-steps (config:base)
|
|
((config:override-keys :initform '(user password))
|
|
(config:env-path :initform (t:test-path ".test.env"))
|
|
(user :initarg :user :reader user)
|
|
(password :initarg :password :reader password)))
|
|
|
|
(defun run ()
|
|
(let ((*config* nil)
|
|
(t:*test-suite* (t:test-suite "steps")))
|
|
(setf (uiop:getenv "SCOPES_PASSWORD") "very_secret")
|
|
(load (t:test-path "config-steps" "etc"))
|
|
(test-make-path)
|
|
(t:show-result)))
|
|
|
|
(t:deftest test-make-path ()
|
|
;(format t "~&runtime-path (.env): ~s" (util:runtime-path ".env" "app"))
|
|
;(format t "~&home-path: ~s" (util:home-path ".env.txt" "lisp" "cl-scopes"))
|
|
(== (pathname-name (util:home-path ".env.txt" "lisp" "cl-scopes")) ".env"))
|