diff options
| author | Hilton Chain <hako@ultrarare.space> | 2026-07-23 06:46:31 +0800 |
|---|---|---|
| committer | Hilton Chain <hako@ultrarare.space> | 2026-08-10 01:09:28 +0800 |
| commit | 4dd120dc3cccb142d4a7f9e0bd059c3ee42c50a2 (patch) | |
| tree | f0eec56a626809fd41c9722167102840e40129e1 /tests | |
| parent | fbdd29305907111d79abaf208f4bd1ed5b46eebb (diff) | |
gexp: Allow gexp inputs when creating vectors using the read syntax.
* guix/gexp.scm (gexp) [collect-escapes, substitute-references]: Support vectors
created using the read syntax.
* tests/gexp.scm ("one input package, vector"): New test.
Merges: #10121
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/gexp.scm | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/gexp.scm b/tests/gexp.scm index fcc269d75a7..2715a46ae5f 100644 --- a/tests/gexp.scm +++ b/tests/gexp.scm | |||
| @@ -194,6 +194,16 @@ | |||
| 194 | (package-derivation %store coreutils))) | 194 | (package-derivation %store coreutils))) |
| 195 | (gexp->sexp* exp))))) | 195 | (gexp->sexp* exp))))) |
| 196 | 196 | ||
| 197 | (test-assert "one input package, vector" | ||
| 198 | (let ((exp (gexp #((ungexp coreutils))))) | ||
| 199 | (and (gexp? exp) | ||
| 200 | (match (gexp-inputs exp) | ||
| 201 | ((input) | ||
| 202 | (eq? (gexp-input-thing input) coreutils))) | ||
| 203 | (equal? (vector (derivation->output-path | ||
| 204 | (package-derivation %store coreutils))) | ||
| 205 | (gexp->sexp* exp))))) | ||
| 206 | |||
| 197 | (test-assert "one input origin" | 207 | (test-assert "one input origin" |
| 198 | (let ((exp (gexp (display (ungexp (package-source coreutils)))))) | 208 | (let ((exp (gexp (display (ungexp (package-source coreutils)))))) |
| 199 | (and (gexp? exp) | 209 | (and (gexp? exp) |
