[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/40: import: opam: Fix conditions.
From: |
guix-commits |
Subject: |
02/40: import: opam: Fix conditions. |
Date: |
Tue, 5 Feb 2019 16:34:52 -0500 (EST) |
roptat pushed a commit to branch master
in repository guix.
commit 0f4432c620f8d569ef29ca74bad2b7eebd803441
Author: Julien Lepiller <address@hidden>
Date: Fri Feb 1 15:58:12 2019 +0100
import: opam: Fix conditions.
* guix/import/opam.scm (condition-eq, condition-neq): The first argument
can be empty.
* tests/opam.scm: Add test case.
---
guix/import/opam.scm | 4 ++--
tests/opam.scm | 4 +++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/guix/import/opam.scm b/guix/import/opam.scm
index c254db5..6ffb16b 100644
--- a/guix/import/opam.scm
+++ b/guix/import/opam.scm
@@ -90,8 +90,8 @@
(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-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-neq all (and condition-content (* SP) (ignore
(and "!" "=")) (* 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-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-string all (and QUOTE (* STRCHR) QUOTE))
diff --git a/tests/opam.scm b/tests/opam.scm
index e0ec5ef..e8c0d15 100644
--- a/tests/opam.scm
+++ b/tests/opam.scm
@@ -192,6 +192,8 @@ url {
("{>= \"0.2.0\" | build}" . (condition-or
(condition-greater-or-equal
(condition-string "0.2.0"))
- (condition-var "build"))))))
+ (condition-var "build")))
+ ("{ = \"1.0+beta19\" }" . (condition-eq
+ (condition-string "1.0+beta19"))))))
(test-end "opam")
- 22/40: gnu: Add ocaml-ppx-sexp-message., (continued)
- 22/40: gnu: Add ocaml-ppx-sexp-message., guix-commits, 2019/02/05
- 18/40: gnu: Add ocaml-ppx-bench., guix-commits, 2019/02/05
- 09/40: gnu: Add ocaml-variantslib., guix-commits, 2019/02/05
- 20/40: gnu: Add ocaml-typerep., guix-commits, 2019/02/05
- 11/40: gnu: Add ocaml-ppx-sexp-conv., guix-commits, 2019/02/05
- 13/40: gnu: Add ocaml-ppx-custom-printf., guix-commits, 2019/02/05
- 07/40: gnu: Add ocaml-ppx-compare., guix-commits, 2019/02/05
- 04/40: gnu: ocaml-ppx-derivers: Add upstream-name., guix-commits, 2019/02/05
- 14/40: gnu: Add ocaml-bin-prot., guix-commits, 2019/02/05
- 10/40: gnu: Add ocaml-ppx-fields-conv., guix-commits, 2019/02/05
- 02/40: import: opam: Fix conditions.,
guix-commits <=
- 03/40: import: opam: Replace "_" with "-" in imported names., guix-commits, 2019/02/05
- 01/40: gnu: unison: Update to 2.51.1., guix-commits, 2019/02/05
- 05/40: import: opam: Work around janestreet version numbers., guix-commits, 2019/02/05