Skip to content

Commit

Permalink
Merge ef7dd81 into 8cc7116
Browse files Browse the repository at this point in the history
  • Loading branch information
svetlyak40wt committed Feb 18, 2021
2 parents 8cc7116 + ef7dd81 commit 7328eff
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 14 deletions.
6 changes: 3 additions & 3 deletions cl-info-test.asd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(defsystem cl-info-test
:author ""
:license ""
:author "Alexander Artemenko"
:license "BSD"
:class :package-inferred-system
:pathname "t"
:depends-on ("hamcrest"
Expand All @@ -9,4 +9,4 @@

:perform (test-op (op c)
(unless (symbol-call :rove :run c)
(error "Tests failed"))))
(error "Tests failed"))))
13 changes: 11 additions & 2 deletions src/core.lisp
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
(defpackage #:cl-info
(uiop:define-package #:cl-info
(:nicknames #:cl-info/core)
(:use #:cl)
(:import-from #:mgl-pax-minimal
#:defsection
#:reader)
(:export #:cl-info
#:get-cl-info
#:get-system-info))
#:get-system-info
#:get-software-version
#:get-software-type
#:get-lisp-version
#:get-lisp-type
#:get-asdf-version
#:get-version
#:get-name
#:absent-p
#:get-path))
(in-package cl-info/core)


Expand Down
18 changes: 9 additions & 9 deletions t/core.lisp
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
(defpackage #:cl-info-test/core
(uiop:define-package #:cl-info-test/core
(:use #:cl)
(:import-from #:cl-info)
(:import-from #:hamcrest/rove
#:contains
#:assert-that)
(:import-from #:rove
#:testing
#:ok
#:deftest))
(in-package cl-info-test/core)


(defun foo (a b)
(list a b))


(deftest test-some-staff
(testing "Replace this test with real staff."
(assert-that (foo 1 2)
(contains 1 2))))
(deftest test-system-info
(testing "Checking if we can get system info and it will have the version from ASDF"
(let ((info (cl-info:get-system-info :cl-info))
(system (asdf:find-system :cl-info)))
(ok (not (null info)))
(ok (equal (cl-info:get-version info)
(asdf:component-version system))))))

0 comments on commit 7328eff

Please sign in to comment.