Make locale monetary conversion tests be less strict on terminal whitespace
authorMichael Gran <spk121@yahoo.com>
Sun, 24 Feb 2019 07:16:31 +0000 (23:16 -0800)
committerMichael Gran <spk121@yahoo.com>
Sun, 24 Feb 2019 07:16:31 +0000 (23:16 -0800)
* test-suite/tests/i18n.test (monetary-amount->locale-string): modified

test-suite/tests/i18n.test

index 73e5381b847f6c52418b9986f809ac5a14e43a6b..811be7b1081cadb0f2137c61b8777d0895799591 100644 (file)
       (under-french-locale-or-unresolved
        (lambda ()
          (let* ((fr  (make-locale LC_ALL %french-locale-name))
-                (str (monetary-amount->locale-string 123456 #f fr)))
+                (str (string-trim-both (monetary-amount->locale-string 123456 #f fr))))
            ;; Check for both NO-BREAK SPACE and SPACE.
            (or (string=? "123 456,00 +EUR" str)
                (string=? "123 456,00 +EUR" str))))))
       (under-french-locale-or-unresolved
        (lambda ()
          (let ((fr (make-locale LC_ALL %french-locale-name)))
-           (monetary-amount->locale-string 0. #f fr)))))
+           (string-trim-both (monetary-amount->locale-string 0. #f fr))))))
 
     (pass-if-equal "one cent"
         "0,01 EUR "