guile-commits
[Top][All Lists]
Advanced

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

[Guile-commits] 04/13: in command line encoding test don't presume extan


From: Mike Gran
Subject: [Guile-commits] 04/13: in command line encoding test don't presume extant UTF-8 locale
Date: Thu, 21 Jan 2021 19:06:15 -0500 (EST)

mike121 pushed a commit to branch master
in repository guile.

commit 0d80eb23e231fb8114101bae1c50e8b5672e653e
Author: Michael Gran <spk121@yahoo.com>
AuthorDate: Mon Nov 23 19:21:25 2020 -0800

    in command line encoding test don't presume extant UTF-8 locale
    
    * test-suite/standalone/test-command-line-encoding: abort if
        locale is not UTF-8
---
 test-suite/standalone/test-command-line-encoding | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/test-suite/standalone/test-command-line-encoding 
b/test-suite/standalone/test-command-line-encoding
index 525c0ae..401011d 100755
--- a/test-suite/standalone/test-command-line-encoding
+++ b/test-suite/standalone/test-command-line-encoding
@@ -16,7 +16,10 @@ exec guile -q -s "$0" "λ"
 ;; according to the locale settings; see
 ;; <http://lists.gnu.org/archive/html/guile-devel/2011-11/msg00026.html> for
 ;; details.
-(exit (string=? (cadr (program-arguments)) "λ"))
+(if (string-contains-ci (setlocale LC_ALL) "utf")
+    (exit (string=? (cadr (program-arguments)) "λ"))
+    ;; If we can't install a UTF-8 locale, skip the test
+    (exit 77))
 
 ;; Local Variables:
 ;; mode: scheme



reply via email to

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