gnu-maintenance.scm 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2015, 2021 Ludovic Courtès <ludo@gnu.org>
  3. ;;;
  4. ;;; This file is part of GNU Guix.
  5. ;;;
  6. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  7. ;;; under the terms of the GNU General Public License as published by
  8. ;;; the Free Software Foundation; either version 3 of the License, or (at
  9. ;;; your option) any later version.
  10. ;;;
  11. ;;; GNU Guix is distributed in the hope that it will be useful, but
  12. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  13. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. ;;; GNU General Public License for more details.
  15. ;;;
  16. ;;; You should have received a copy of the GNU General Public License
  17. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  18. (define-module (test-gnu-maintenance)
  19. #:use-module (guix gnu-maintenance)
  20. #:use-module (srfi srfi-1)
  21. #:use-module (srfi srfi-64)
  22. #:use-module (ice-9 match))
  23. (test-begin "gnu-maintenance")
  24. (test-assert "release-file?"
  25. (and (every (lambda (project+file)
  26. (apply release-file? project+file))
  27. '(("gcc" "gcc-5.3.0.tar.bz2")
  28. ("texmacs" "TeXmacs-1.0.7.9-src.tar.gz")
  29. ("icecat" "icecat-38.4.0-gnu1.tar.bz2")
  30. ("mit-scheme" "mit-scheme-9.2.tar.gz")
  31. ("mediainfo" "mediainfo_20.09.tar.xz")
  32. ("exiv2" "exiv2-0.27.3-Source.tar.gz")
  33. ("mpg321" "mpg321_0.3.2.orig.tar.gz")
  34. ("bvi" "bvi-1.4.1.src.tar.gz")
  35. ("hostscope" "hostscope-V2.1.tgz")))
  36. (every (lambda (project+file)
  37. (not (apply release-file? project+file)))
  38. '(("guile" "guile-www-1.1.1.tar.gz")
  39. ("guile" "guile-2.0.11.tar.gz.sig")
  40. ("mit-scheme" "mit-scheme-9.2-i386.tar.gz")
  41. ("mit-scheme" "mit-scheme-9.2-doc-pdf.tar.gz")
  42. ("gnutls" "gnutls-3.2.18-w32.zip")))))
  43. (test-assert "tarball->version"
  44. (let ((tarball->version (@@ (guix gnu-maintenance) tarball->version)))
  45. (every (match-lambda
  46. ((file version)
  47. (equal? (tarball->version file) version)))
  48. '(("coreutils-8.32.tar.gz" "8.32")
  49. ("mediainfo_20.09.tar.xz" "20.09")
  50. ("exiv2-0.27.3-Source.tar.gz" "0.27.3")
  51. ("mpg321_0.3.2.orig.tar.gz" "0.3.2")
  52. ("bvi-1.4.1.src.tar.gz" "1.4.1")))))
  53. (test-end)