diff options
author | Eric Bavier <bavier@member.fsf.org> | 2015-09-10 15:39:44 -0500 |
---|---|---|
committer | Eric Bavier <bavier@member.fsf.org> | 2015-09-14 18:02:37 -0500 |
commit | 3b4d01035f214ac57ac1517b719e2b0f0f092411 (patch) | |
tree | a4c485f05a0393fe98f54f7ec17b7fe70f7d3e80 /tests | |
parent | eb95ace9f191a7291e6daf9c4af8759237408696 (diff) | |
download | gnu-guix-3b4d01035f214ac57ac1517b719e2b0f0f092411.tar gnu-guix-3b4d01035f214ac57ac1517b719e2b0f0f092411.tar.gz |
guix: packages: Add origin-actual-file-name.
* guix/scripts/graph.scm (uri->file-name, node-full-name): Move origin file
name logic to...
* guix/packages.scm (origin-actual-file-name): ...here.
* tests/packages.scm ("origin-actual-file-name")
("origin-actual-file-name, file-name"): New tests.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/packages.scm | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/packages.scm b/tests/packages.scm index 00a0998b4c..ace2f36f19 100644 --- a/tests/packages.scm +++ b/tests/packages.scm @@ -177,6 +177,18 @@ (package-transitive-supported-systems d) (package-transitive-supported-systems e)))) +(test-equal "origin-actual-file-name" + "foo-1.tar.gz" + (let ((o (dummy-origin (uri "http://www.example.com/foo-1.tar.gz")))) + (origin-actual-file-name o))) + +(test-equal "origin-actual-file-name, file-name" + "foo-1.tar.gz" + (let ((o (dummy-origin + (uri "http://www.example.com/tarball") + (file-name "foo-1.tar.gz")))) + (origin-actual-file-name o))) + (let* ((o (dummy-origin)) (u (dummy-origin)) (i (dummy-origin)) |