summaryrefslogtreecommitdiff
path: root/tests/import/utils.scm
AgeCommit message (Collapse)AuthorFilesLines
9 daysimport/utils: Allow `find-version' to match an over-specified version.Maxim Cournoyer1-0/+25
This fixes the use case of using --target-version with an exact match (--target-version causes the partial? mode to be enabled). * tests/import/utils.scm ("find-version, latest") ("find-version, empty versions list") ("find-version, partial, under-specified") ("find-version, partial, exact") ("find-version, partial, over-specified"): New tests. * guix/import/utils.scm (find-version): [PARTIAL?]: Truncate VERSION to the maximum length of VERSIONS. Explicitly handle the empty versions case.
2026-03-10style: git-source: Handle more URLs.Ludovic Courtès1-0/+9
* guix/import/utils.scm (tarball-url->git-repository-url): New procedure. * guix/scripts/style.scm (url-fetch->git-fetch)[transform-source]: Add ‘repository-url’ parameter. Use ‘tarball-url->git-repository-url’ when ‘home-page’ is not a Git URL. (transform-to-git-fetch): Rename ‘home-page’ to ‘repository-url’. * tests/import/utils.scm ("tarball-url->git-repository-url, guile"): New test. * tests/style.scm ("url-fetch->git-fetch, mirror:// URL"): New test. Change-Id: I4f8ca7c67a58f917d69380678b62c00962b0f9cd Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-10-24import: utils: Add generate-git-source procedure.Nicolas Graves1-0/+42
This procedure tries to generate a <origin> sexp from a single url and version. * guix/import/utils.scm (generate-git-source): Add procedure. * tests/import/utils.scm: Add tests for generate-git-source. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-10-24import: utils: Fix default-git-error.Nicolas Graves1-0/+24
This function was missing one argument. * guix/import/utils.scm (default-git-error): Add and document location argument. * tests/import/utils.scm: Add tests for default-git-error. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-10-01import: utils: Move tests to tests/import/utils.scm.Nicolas Graves1-0/+281
* tests/utils.scm: Move to tests/import/utils.scm. * Makefile.am: Refresh it. Signed-off-by: Ludovic Courtès <ludo@gnu.org>