mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-19 13:49:17 +02:00
wrap tests in groups
This commit is contained in:
parent
97ca7e1799
commit
873e1c490f
1 changed files with 29 additions and 6 deletions
|
@ -105,6 +105,11 @@
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;; basics
|
;; basics
|
||||||
|
|
||||||
|
(define lucas-sld-path
|
||||||
|
(make-path install-libdir "edouard/lucas.sld"))
|
||||||
|
|
||||||
|
(test-group "basics"
|
||||||
|
|
||||||
;; package
|
;; package
|
||||||
(snow package --output-dir tests/snow --authors "Édouard Lucas"
|
(snow package --output-dir tests/snow --authors "Édouard Lucas"
|
||||||
--description "Lucas recurrence relation"
|
--description "Lucas recurrence relation"
|
||||||
|
@ -113,8 +118,6 @@
|
||||||
|
|
||||||
;; install
|
;; install
|
||||||
(snow install tests/snow/edouard-lucas.tgz)
|
(snow install tests/snow/edouard-lucas.tgz)
|
||||||
(define lucas-sld-path
|
|
||||||
(make-path install-libdir "edouard/lucas.sld"))
|
|
||||||
(test-assert (file-exists? lucas-sld-path))
|
(test-assert (file-exists? lucas-sld-path))
|
||||||
(delete-file "tests/snow/edouard-lucas.tgz")
|
(delete-file "tests/snow/edouard-lucas.tgz")
|
||||||
|
|
||||||
|
@ -126,10 +129,17 @@
|
||||||
(test-not (file-exists? lucas-sld-path))
|
(test-not (file-exists? lucas-sld-path))
|
||||||
(test-not (installed-version (snow-status) '(edouard lucas)))
|
(test-not (installed-version (snow-status) '(edouard lucas)))
|
||||||
|
|
||||||
|
)
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;; install/upgrade via local repos
|
;; install/upgrade via local repos
|
||||||
|
|
||||||
(define repo1 '(--repository-uri tests/snow/repo1/repo.scm))
|
(define repo1 '(--repository-uri tests/snow/repo1/repo.scm))
|
||||||
|
(define repo2 '(--repository-uri tests/snow/repo2/repo.scm))
|
||||||
|
(define repo3 '(--repository-uri tests/snow/repo3/repo.scm))
|
||||||
|
|
||||||
|
(test-group "local repo"
|
||||||
|
|
||||||
(snow package --output-dir tests/snow/repo1/
|
(snow package --output-dir tests/snow/repo1/
|
||||||
--version 1.0 --authors "Leonardo Fibonacci"
|
--version 1.0 --authors "Leonardo Fibonacci"
|
||||||
--description "Fibonacci recurrence relation"
|
--description "Fibonacci recurrence relation"
|
||||||
|
@ -139,7 +149,6 @@
|
||||||
(snow ,@repo1 install --show-tests leonardo.fibonacci)
|
(snow ,@repo1 install --show-tests leonardo.fibonacci)
|
||||||
(test "1.0" (installed-version (snow-status) '(leonardo fibonacci)))
|
(test "1.0" (installed-version (snow-status) '(leonardo fibonacci)))
|
||||||
|
|
||||||
(define repo2 '(--repository-uri tests/snow/repo2/repo.scm))
|
|
||||||
(snow package --output-dir tests/snow/repo2/
|
(snow package --output-dir tests/snow/repo2/
|
||||||
--version 1.1 --authors "Leonardo Fibonacci"
|
--version 1.1 --authors "Leonardo Fibonacci"
|
||||||
--description "Fibonacci recurrence relation"
|
--description "Fibonacci recurrence relation"
|
||||||
|
@ -149,7 +158,6 @@
|
||||||
(snow ,@repo2 upgrade leonardo.fibonacci)
|
(snow ,@repo2 upgrade leonardo.fibonacci)
|
||||||
(test "1.1" (installed-version (snow-status) '(leonardo fibonacci)))
|
(test "1.1" (installed-version (snow-status) '(leonardo fibonacci)))
|
||||||
|
|
||||||
(define repo3 '(--repository-uri tests/snow/repo3/repo.scm))
|
|
||||||
(setenv "PINGALA_GANAS_PATH"
|
(setenv "PINGALA_GANAS_PATH"
|
||||||
"pingala:tests/snow/tmp-root/share/snow/chibi/pingala")
|
"pingala:tests/snow/tmp-root/share/snow/chibi/pingala")
|
||||||
(snow package --output-dir tests/snow/repo3/
|
(snow package --output-dir tests/snow/repo3/
|
||||||
|
@ -236,9 +244,13 @@
|
||||||
(snow ,@repo3 install pythagoras.hypotenuse)
|
(snow ,@repo3 install pythagoras.hypotenuse)
|
||||||
(test-assert (installed-version (snow-status) '(pythagoras hypotenuse)))
|
(test-assert (installed-version (snow-status) '(pythagoras hypotenuse)))
|
||||||
|
|
||||||
|
)
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;; other implementations
|
;; other implementations
|
||||||
|
|
||||||
|
(test-group "other impls"
|
||||||
|
|
||||||
(snow ,@repo2 --implementations "gauche,kawa,larceny"
|
(snow ,@repo2 --implementations "gauche,kawa,larceny"
|
||||||
install leonardo.fibonacci)
|
install leonardo.fibonacci)
|
||||||
(let ((status (snow-status --implementations "gauche,kawa,larceny")))
|
(let ((status (snow-status --implementations "gauche,kawa,larceny")))
|
||||||
|
@ -280,10 +292,15 @@
|
||||||
(test-not (installed-version status '(recorde equal) 'kawa))
|
(test-not (installed-version status '(recorde equal) 'kawa))
|
||||||
(test-not (installed-version status '(recorde equal) 'larceny)))
|
(test-not (installed-version status '(recorde equal) 'larceny)))
|
||||||
|
|
||||||
|
)
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;; smart packaging
|
;; smart packaging
|
||||||
|
|
||||||
(define repo4 '(--repository-uri tests/snow/repo4/repo.scm))
|
(define repo4 '(--repository-uri tests/snow/repo4/repo.scm))
|
||||||
|
|
||||||
|
(test-group "packaging"
|
||||||
|
|
||||||
(setenv "SNOW_CHIBI_CONFIG" "tests/snow/repo4/config.scm")
|
(setenv "SNOW_CHIBI_CONFIG" "tests/snow/repo4/config.scm")
|
||||||
|
|
||||||
(snow ,@repo4 package --output-dir tests/snow/repo4/
|
(snow ,@repo4 package --output-dir tests/snow/repo4/
|
||||||
|
@ -322,20 +339,26 @@
|
||||||
(run-euler-exponential-test-tests))
|
(run-euler-exponential-test-tests))
|
||||||
(snowball-test->sexp-list pkg pkg-file)))
|
(snowball-test->sexp-list pkg pkg-file)))
|
||||||
|
|
||||||
|
)
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;; multiple repos
|
;; multiple repos
|
||||||
|
|
||||||
(define repo3+4
|
(define repo3+4
|
||||||
'(--repository-uri "tests/snow/repo3/repo.scm,tests/snow/repo4/repo.scm"))
|
'(--repository-uri "tests/snow/repo3/repo.scm,tests/snow/repo4/repo.scm"))
|
||||||
|
|
||||||
|
(define repo5 '(--repository-uri tests/snow/repo5/repo.scm))
|
||||||
|
|
||||||
|
(test-group "multiple repos"
|
||||||
|
|
||||||
(let ((ls (snow->sexp ,@repo3+4 search euler)))
|
(let ((ls (snow->sexp ,@repo3+4 search euler)))
|
||||||
(test-assert (assoc '(euler interest) ls))
|
(test-assert (assoc '(euler interest) ls))
|
||||||
(test-assert (assoc '(euler totient) ls)))
|
(test-assert (assoc '(euler totient) ls)))
|
||||||
|
|
||||||
(define repo5 '(--repository-uri tests/snow/repo5/repo.scm))
|
|
||||||
|
|
||||||
(let ((ls (snow->sexp ,@repo5 search euler)))
|
(let ((ls (snow->sexp ,@repo5 search euler)))
|
||||||
(test-assert (assoc '(euler interest) ls))
|
(test-assert (assoc '(euler interest) ls))
|
||||||
(test-assert (assoc '(euler totient) ls)))
|
(test-assert (assoc '(euler totient) ls)))
|
||||||
|
|
||||||
|
)
|
||||||
|
|
||||||
(test-end)
|
(test-end)
|
||||||
|
|
Loading…
Add table
Reference in a new issue