mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 05:18:07 -05:00
import: opam: Fix conditions.
* guix/import/opam.scm (condition-eq, condition-neq): The first argument can be empty. * tests/opam.scm: Add test case.
This commit is contained in:
parent
6c8666b451
commit
0f4432c620
2 changed files with 5 additions and 3 deletions
|
@ -90,8 +90,8 @@ (define-peg-pattern condition-lower-or-equal all (and (ignore (and "<" "=")) (*
|
||||||
(define-peg-pattern condition-lower all (and (ignore "<") (* SP) condition-string))
|
(define-peg-pattern condition-lower all (and (ignore "<") (* SP) condition-string))
|
||||||
(define-peg-pattern condition-and all (and condition-form2 (* SP) (? (ignore "&")) (* SP) condition-form))
|
(define-peg-pattern condition-and all (and condition-form2 (* SP) (? (ignore "&")) (* SP) condition-form))
|
||||||
(define-peg-pattern condition-or all (and condition-form2 (* SP) (ignore "|") (* SP) condition-form))
|
(define-peg-pattern condition-or all (and condition-form2 (* SP) (ignore "|") (* SP) condition-form))
|
||||||
(define-peg-pattern condition-eq all (and condition-content (* SP) (ignore "=") (* SP) condition-content))
|
(define-peg-pattern condition-eq all (and (? condition-content) (* SP) (ignore "=") (* SP) condition-content))
|
||||||
(define-peg-pattern condition-neq all (and condition-content (* SP) (ignore (and "!" "=")) (* SP) condition-content))
|
(define-peg-pattern condition-neq all (and (? condition-content) (* SP) (ignore (and "!" "=")) (* SP) condition-content))
|
||||||
(define-peg-pattern condition-content body (or condition-string condition-var))
|
(define-peg-pattern condition-content body (or condition-string condition-var))
|
||||||
(define-peg-pattern condition-content2 body (and condition-content (* SP) (not-followed-by (or "&" "=" "!"))))
|
(define-peg-pattern condition-content2 body (and condition-content (* SP) (not-followed-by (or "&" "=" "!"))))
|
||||||
(define-peg-pattern condition-string all (and QUOTE (* STRCHR) QUOTE))
|
(define-peg-pattern condition-string all (and QUOTE (* STRCHR) QUOTE))
|
||||||
|
|
|
@ -192,6 +192,8 @@ (define test-repo
|
||||||
("{>= \"0.2.0\" | build}" . (condition-or
|
("{>= \"0.2.0\" | build}" . (condition-or
|
||||||
(condition-greater-or-equal
|
(condition-greater-or-equal
|
||||||
(condition-string "0.2.0"))
|
(condition-string "0.2.0"))
|
||||||
(condition-var "build"))))))
|
(condition-var "build")))
|
||||||
|
("{ = \"1.0+beta19\" }" . (condition-eq
|
||||||
|
(condition-string "1.0+beta19"))))))
|
||||||
|
|
||||||
(test-end "opam")
|
(test-end "opam")
|
||||||
|
|
Loading…
Reference in a new issue