guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

03/17: gnu: utf8proc: Enable tests.


From: Eric Bavier
Subject: 03/17: gnu: utf8proc: Enable tests.
Date: Mon, 13 Feb 2017 23:37:16 -0500 (EST)

bavier pushed a commit to branch master
in repository guix.

commit 5353cea007e72dba27ddd2cc02a37180dedec97c
Author: Eric Bavier <address@hidden>
Date:   Fri Feb 10 23:18:49 2017 -0600

    gnu: utf8proc: Enable tests.
    
    * gnu/packages/textutils.scm (utf8proc)[inputs]: New field.
    [arguments]: Remove '#:tests? #f'.  Add check-data phase.
---
 gnu/packages/textutils.scm | 30 +++++++++++++++++++++++++++---
 1 file changed, 27 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/textutils.scm b/gnu/packages/textutils.scm
index 3d68bb8..9e6309a 100644
--- a/gnu/packages/textutils.scm
+++ b/gnu/packages/textutils.scm
@@ -8,6 +8,7 @@
 ;;; Copyright © 2016 Efraim Flashner <address@hidden>
 ;;; Copyright © 2016 ng0 <address@hidden>
 ;;; Copyright © 2016 Marius Bakke <address@hidden>
+;;; Copyright © 2017 Eric Bavier <address@hidden>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -120,13 +121,36 @@ libenca and several charset conversion libraries and 
tools.")
        (sha256
         (base32 "0q1jhdkk4f9b0zb8s2ql3sba3br5nvjsmbsaybmgj064k9hwbk15"))))
     (build-system gnu-build-system)
+    (inputs                  ;test data that is otherwise downloaded with curl
+     `(("NormalizationTest.txt"
+        ,(origin
+           (method url-fetch)
+           (uri (string-append "http://www.unicode.org/Public/9.0.0/ucd/";
+                               "NormalizationTest.txt"))
+           (sha256
+            (base32 "1fxrz0bilsbwl685336aqi88k62i6nqhm62rvy4zhg3bcm4dhj1d"))))
+       ("GraphemeBreakTest.txt"
+        ,(origin
+           (method url-fetch)
+           (uri (string-append "http://www.unicode.org/Public/9.0.0/ucd/";
+                               "auxiliary/GraphemeBreakTest.txt"))
+           (sha256
+            (base32 
"0qbhyhmf0778lc2hcwlpizrvmdxwpk959v2q2wb8abv09ba7wvn7"))))))
     (arguments
-     '(#:tests? #f ;no "check" target
-       #:make-flags (list "CC=gcc"
+     '(#:make-flags (list "CC=gcc"
                           (string-append "prefix=" (assoc-ref %outputs "out")))
        #:phases
        (modify-phases %standard-phases
-         (delete 'configure))))
+         (delete 'configure)
+         (add-before 'check 'check-data
+           (lambda* (#:key inputs #:allow-other-keys)
+             (for-each (lambda (i)
+                         (copy-file (assoc-ref inputs i)
+                                    (string-append "data/" i)))
+                       '("NormalizationTest.txt" "GraphemeBreakTest.txt"))
+             (substitute* "data/GraphemeBreakTest.txt"
+               (("÷") "/")
+               (("×") "+")))))))
     (home-page "http://julialang.org/utf8proc/";)
     (synopsis "C library for processing UTF-8 Unicode data")
     (description "utf8proc is a small C library that provides Unicode



reply via email to

[Prev in Thread] Current Thread [Next in Thread]