1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-09 21:40:33 +02:00

skip version test if git-version-gen can't compute version from git

This might occur due to a shallow git clone.

* test-suite/tests/version.test: throw unsupported if version is unknown
This commit is contained in:
Michael Gran 2020-12-28 14:53:07 -08:00
parent 449b9bd5e1
commit efecac1c7d

View file

@ -1,7 +1,7 @@
;;;; version.test --- test suite for Guile's version functions -*- scheme -*- ;;;; version.test --- test suite for Guile's version functions -*- scheme -*-
;;;; Greg J. Badros <gjb@cs.washington.edu> ;;;; Greg J. Badros <gjb@cs.washington.edu>
;;;; ;;;;
;;;; Copyright (C) 2000, 2001, 2006, 2010 Free Software Foundation, Inc. ;;;; Copyright (C) 2000,2001,2006,2010,2020 Free Software Foundation, Inc.
;;;; ;;;;
;;;; This library is free software; you can redistribute it and/or ;;;; This library is free software; you can redistribute it and/or
;;;; modify it under the terms of the GNU Lesser General Public ;;;; modify it under the terms of the GNU Lesser General Public
@ -21,10 +21,12 @@
#:use-module (test-suite lib)) #:use-module (test-suite lib))
(pass-if "version reporting works" (pass-if "version reporting works"
(and (string? (major-version)) (if (string-contains (version) "UNKNOWN")
(string? (minor-version)) (throw 'unsupported)
(string? (micro-version)) (and (string? (major-version))
(string-contains (version) (string? (minor-version))
(string-append (major-version) "." (string? (micro-version))
(minor-version) "." (string-contains (version)
(micro-version))))) (string-append (major-version) "."
(minor-version) "."
(micro-version))))))