guile-commits
[Top][All Lists]
Advanced

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

[Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.9-196-g0ce22


From: Mark H Weaver
Subject: [Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.9-196-g0ce2245
Date: Sat, 08 Feb 2014 02:55:31 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Guile".

http://git.savannah.gnu.org/cgit/guile.git/commit/?id=0ce224594ae5a673f6a397c284db5f5a61935334

The branch, stable-2.0 has been updated
       via  0ce224594ae5a673f6a397c284db5f5a61935334 (commit)
      from  495cea0c931de23f074892b3f32808e676712a18 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 0ce224594ae5a673f6a397c284db5f5a61935334
Author: Mark H Weaver <address@hidden>
Date:   Fri Feb 7 21:42:28 2014 -0500

    Improve handling of locales in the test suite.
    
    * test-suite/guile-test (run-tests): Load each test file within
      (with-locale "C" ...).
    
    * test-suite/tests/encoding-iso88591.test:
    * test-suite/tests/encoding-iso88597.test:
    * test-suite/tests/encoding-utf8.test:
    * test-suite/tests/srfi-14.test: Remove broken code to save and restore
      the previous locale.
    
    * test-suite/tests/bytevectors.test:
    * test-suite/tests/format.test:
    * test-suite/tests/regexp.test:
    * test-suite/tests/srfi-19.test:
    * test-suite/tests/tree-il.test: Make sure 'setlocale' is defined before
      calling it.

-----------------------------------------------------------------------

Summary of changes:
 test-suite/guile-test                   |    8 +++++---
 test-suite/tests/bytevectors.test       |    7 +++++--
 test-suite/tests/encoding-iso88591.test |   11 +++--------
 test-suite/tests/encoding-iso88597.test |   12 ++++--------
 test-suite/tests/encoding-utf8.test     |   10 +++-------
 test-suite/tests/format.test            |    7 +++++--
 test-suite/tests/regexp.test            |    6 +++---
 test-suite/tests/srfi-14.test           |   10 +++-------
 test-suite/tests/srfi-19.test           |    5 +++--
 test-suite/tests/tree-il.test           |    6 ++++--
 10 files changed, 38 insertions(+), 44 deletions(-)

diff --git a/test-suite/guile-test b/test-suite/guile-test
index cdcfe49..43ea481 100755
--- a/test-suite/guile-test
+++ b/test-suite/guile-test
@@ -5,7 +5,7 @@
 ;;;; guile-test --- run the Guile test suite
 ;;;; Jim Blandy <address@hidden> --- May 1999
 ;;;;
-;;;;   Copyright (C) 1999, 2001, 2006, 2010 Free Software Foundation, Inc.
+;;;; Copyright (C) 1999, 2001, 2006, 2010, 2014 Free Software Foundation, Inc.
 ;;;;
 ;;;; This program is free software; you can redistribute it and/or
 ;;;; modify it under the terms of the GNU Lesser General Public
@@ -239,8 +239,9 @@
                  (lambda ()
                    (for-each (lambda (test)
                                (display (string-append "Running " test "\n"))
-                               (with-test-prefix test
-                                                 (load (test-file-name test))))
+                               (with-locale "C"
+                                 (with-test-prefix test
+                                   (load (test-file-name test)))))
                              tests))))
             (if (opt 'coverage #f)
                 (let-values (((coverage-data _)
@@ -262,4 +263,5 @@
 
 ;;; Local Variables:
 ;;; mode: scheme
+;;; eval: (put 'with-locale 'scheme-indent-function 1)
 ;;; End:
diff --git a/test-suite/tests/bytevectors.test 
b/test-suite/tests/bytevectors.test
index 524ce86..637d6d4 100644
--- a/test-suite/tests/bytevectors.test
+++ b/test-suite/tests/bytevectors.test
@@ -1,6 +1,8 @@
 ;;;; bytevectors.test --- R6RS bytevectors. -*- mode: scheme; coding: utf-8; 
-*-
 ;;;;
-;;;; Copyright (C) 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc.
+;;;; Copyright (C) 2009, 2010, 2011, 2012, 2013,
+;;;;   2014 Free Software Foundation, Inc.
+;;;;
 ;;;; Ludovic Courtès
 ;;;;
 ;;;; This library is free software; you can redistribute it and/or
@@ -398,7 +400,8 @@
 
 
 ;; Default to the C locale for the following tests.
-(setlocale LC_ALL "C")
+(when (defined? 'setlocale)
+  (setlocale LC_ALL "C"))
 
 
 (with-test-prefix "2.9 Operations on Strings"
diff --git a/test-suite/tests/encoding-iso88591.test 
b/test-suite/tests/encoding-iso88591.test
index 8265ff1..2af2b48 100644
--- a/test-suite/tests/encoding-iso88591.test
+++ b/test-suite/tests/encoding-iso88591.test
@@ -1,6 +1,6 @@
 ;;;; encoding-iso88591.test --- test suite for Guile's string encodings    -*- 
mode: scheme; coding: iso-8859-1 -*-
 ;;;;
-;;;; Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+;;;; Copyright (C) 2009, 2010, 2014 Free Software Foundation, Inc.
 ;;;;
 ;;;; This library is free software; you can redistribute it and/or
 ;;;; modify it under the terms of the GNU Lesser General Public
@@ -25,9 +25,8 @@
   (apply string (map integer->char args)))
 
 ;; Set locale to the environment's locale, so that the prints look OK.
-(define oldlocale #f)
-(if (defined? 'setlocale)
-    (set! oldlocale (setlocale LC_ALL "")))
+(when (defined? 'setlocale)
+  (setlocale LC_ALL ""))
 
 (define ascii-a (integer->char 65))     ; LATIN CAPITAL LETTER A
 (define a-acute (integer->char #x00c1)) ; LATIN CAPITAL LETTER A WITH ACUTE
@@ -177,7 +176,3 @@
                       (set-port-encoding! pt "ISO-8859-1")
                       (set-port-conversion-strategy! pt 'error)
                       (display (string-ints 256) pt))))
-
-;; Reset locales
-(if (defined? 'setlocale)
-    (setlocale LC_ALL oldlocale))
diff --git a/test-suite/tests/encoding-iso88597.test 
b/test-suite/tests/encoding-iso88597.test
index a577b2a..e88b9d3 100644
--- a/test-suite/tests/encoding-iso88597.test
+++ b/test-suite/tests/encoding-iso88597.test
@@ -1,6 +1,6 @@
 ;;;; encoding-iso88697.test --- test suite for Guile's string encodings    -*- 
mode: scheme; coding: iso-8859-7 -*-
 ;;;;
-;;;; Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+;;;; Copyright (C) 2009, 2010, 2014 Free Software Foundation, Inc.
 ;;;;
 ;;;; This library is free software; you can redistribute it and/or
 ;;;; modify it under the terms of the GNU Lesser General Public
@@ -24,9 +24,9 @@
 (define (string-ints . args)
   (apply string (map integer->char args)))
 
-(define oldlocale #f)
-(if (defined? 'setlocale)
-    (set! oldlocale (setlocale LC_ALL "")))
+(when (defined? 'setlocale)
+  (setlocale LC_ALL ""))
+
 (define ascii-a (integer->char 65))     ; LATIN CAPITAL LETTER A
 (define a-acute (integer->char #x00c1)) ; LATIN CAPITAL LETTER A WITH ACUTE
 (define alpha (integer->char #x03b1))   ; GREEK SMALL LETTER ALPHA
@@ -167,7 +167,3 @@
                       (set-port-encoding! pt "ISO-8859-7")
                       (set-port-conversion-strategy! pt 'error)
                       (display (string-ints #x0400) pt))))
-
-;; Reset locale
-(if (defined? 'setlocale)
-    (setlocale LC_ALL oldlocale))
diff --git a/test-suite/tests/encoding-utf8.test 
b/test-suite/tests/encoding-utf8.test
index 1de3fa7..786170e 100644
--- a/test-suite/tests/encoding-utf8.test
+++ b/test-suite/tests/encoding-utf8.test
@@ -1,6 +1,6 @@
 ;;;; encoding-utf8.test --- test suite for Guile's string encodings    -*- 
mode: scheme; coding: utf-8 -*-
 ;;;;
-;;;; Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+;;;; Copyright (C) 2009, 2010, 2014 Free Software Foundation, Inc.
 ;;;;
 ;;;; This library is free software; you can redistribute it and/or
 ;;;; modify it under the terms of the GNU Lesser General Public
@@ -24,9 +24,8 @@
 (define (string-ints . args)
   (apply string (map integer->char args)))
 
-(define oldlocale #f)
-(if (defined? 'setlocale)
-    (set! oldlocale (setlocale LC_ALL "")))
+(when (defined? 'setlocale)
+  (setlocale LC_ALL ""))
 
 (define ascii-a (integer->char 65))     ; LATIN CAPITAL LETTER A
 (define a-acute (integer->char #x00c1)) ; LATIN CAPITAL LETTER A WITH ACUTE
@@ -189,6 +188,3 @@
           (let ((芥川龍之介  1)
                 (ñ 2))
             (eqv? (+  芥川龍之介 ñ) 3))))
-
-(if (defined? 'setlocale)
-    (setlocale LC_ALL oldlocale))
diff --git a/test-suite/tests/format.test b/test-suite/tests/format.test
index a411b49..3349847 100644
--- a/test-suite/tests/format.test
+++ b/test-suite/tests/format.test
@@ -1,7 +1,8 @@
 ;;;; format.test --- test suite for Guile's CL-ish format  -*- scheme -*-
 ;;;; Matthias Koeppe <address@hidden> --- June 2001
 ;;;;
-;;;; Copyright (C) 2001, 2003, 2004, 2006, 2010, 2011, 2012 Free Software 
Foundation, Inc.
+;;;; Copyright (C) 2001, 2003, 2004, 2006, 2010, 2011, 2012,
+;;;;   2014 Free Software Foundation, Inc.
 ;;;;
 ;;;; This library is free software; you can redistribute it and/or
 ;;;; modify it under the terms of the GNU Lesser General Public
@@ -101,7 +102,9 @@
 ;;; ~h
 ;;;
 
-(setlocale LC_ALL "C")
+(when (defined? 'setlocale)
+  (setlocale LC_ALL "C"))
+
 (with-test-prefix "~h localized number"
 
   (pass-if "1234.5"
diff --git a/test-suite/tests/regexp.test b/test-suite/tests/regexp.test
index b5c59f0..974071a 100644
--- a/test-suite/tests/regexp.test
+++ b/test-suite/tests/regexp.test
@@ -2,7 +2,7 @@
 ;;;; Jim Blandy <address@hidden> --- September 1999
 ;;;;
 ;;;;   Copyright (C) 1999, 2004, 2006, 2007, 2008, 2009, 2010,
-;;;;      2012, 2013 Free Software Foundation, Inc.
+;;;;      2012, 2013, 2014 Free Software Foundation, Inc.
 ;;;;
 ;;;; This library is free software; you can redistribute it and/or
 ;;;; modify it under the terms of the GNU Lesser General Public
@@ -23,8 +23,8 @@
   #:use-module (srfi srfi-1)
   #:use-module (ice-9 regex))
 
-(if (defined? 'setlocale)
-    (setlocale LC_ALL "C"))
+(when (defined? 'setlocale)
+  (setlocale LC_ALL "C"))
 
 ;; Don't fail if we can't display a test name to stdout/stderr.
 (set-port-conversion-strategy! (current-output-port) 'escape)
diff --git a/test-suite/tests/srfi-14.test b/test-suite/tests/srfi-14.test
index 5f93760..f511f1c 100644
--- a/test-suite/tests/srfi-14.test
+++ b/test-suite/tests/srfi-14.test
@@ -2,7 +2,7 @@
 ;;;; --- Test suite for Guile's SRFI-14 functions.
 ;;;; Martin Grabmueller, 2001-07-16
 ;;;;
-;;;; Copyright (C) 2001, 2006, 2009, 2010 Free Software Foundation, Inc.
+;;;; Copyright (C) 2001, 2006, 2009, 2010, 2014 Free Software Foundation, Inc.
 ;;;;
 ;;;; This library is free software; you can redistribute it and/or
 ;;;; modify it under the terms of the GNU Lesser General Public
@@ -745,9 +745,8 @@
 (define (every? pred lst)
   (not (not (every pred lst))))
 
-(define oldlocale #f)
-(if (defined? 'setlocale)
-    (set! oldlocale (setlocale LC_ALL "")))
+(when (defined? 'setlocale)
+  (setlocale LC_ALL ""))
 
 (with-test-prefix "Latin-1 (8-bit charset)"
 
@@ -844,6 +843,3 @@
                                             (map (lambda (x) (+ #x80 x))
                                                  (iota #x20))))))
                 char-set:iso-control)))
-
-(if (defined? 'setlocale)
-    (setlocale LC_ALL oldlocale))
diff --git a/test-suite/tests/srfi-19.test b/test-suite/tests/srfi-19.test
index 8819c4f..d63e622 100644
--- a/test-suite/tests/srfi-19.test
+++ b/test-suite/tests/srfi-19.test
@@ -2,7 +2,7 @@
 ;;;; Matthias Koeppe <address@hidden> --- June 2001
 ;;;;
 ;;;; Copyright (C) 2001, 2003, 2004, 2005, 2006, 2007, 2008,
-;;;;   2011 Free Software Foundation, Inc.
+;;;;   2011, 2014 Free Software Foundation, Inc.
 ;;;;
 ;;;; This library is free software; you can redistribute it and/or
 ;;;; modify it under the terms of the GNU Lesser General Public
@@ -28,7 +28,8 @@
   :use-module (ice-9 format))
 
 ;; Make sure we use the default locale.
-(setlocale LC_ALL "C")
+(when (defined? 'setlocale)
+  (setlocale LC_ALL "C"))
 
 (define (with-tz* tz thunk)
   "Temporarily set the TZ environment variable to the passed string
diff --git a/test-suite/tests/tree-il.test b/test-suite/tests/tree-il.test
index ddc3e76..34bc810 100644
--- a/test-suite/tests/tree-il.test
+++ b/test-suite/tests/tree-il.test
@@ -1,7 +1,8 @@
 ;;;; tree-il.test --- test suite for compiling tree-il   -*- scheme -*-
 ;;;; Andy Wingo <address@hidden> --- May 2009
 ;;;;
-;;;;   Copyright (C) 2009, 2010, 2011, 2012, 2013 Free Software Foundation, 
Inc.
+;;;; Copyright (C) 2009, 2010, 2011, 2012, 2013,
+;;;;   2014 Free Software Foundation, Inc.
 ;;;;
 ;;;; This library is free software; you can redistribute it and/or
 ;;;; modify it under the terms of the GNU Lesser General Public
@@ -766,7 +767,8 @@
 ;;;
 
 ;; Make sure we get English messages.
-(setlocale LC_ALL "C")
+(when (defined? 'setlocale)
+  (setlocale LC_ALL "C"))
 
 (define (call-with-warnings thunk)
   (let ((port (open-output-string)))


hooks/post-receive
-- 
GNU Guile



reply via email to

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