[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 51/55: Avoid 'with-latin1-locale' in binary I/O tests.
From: |
Andy Wingo |
Subject: |
[Guile-commits] 51/55: Avoid 'with-latin1-locale' in binary I/O tests. |
Date: |
Thu, 23 May 2019 11:52:45 -0400 (EDT) |
wingo pushed a commit to branch master
in repository guile.
commit c6692a4825795494cedfab475b89d2efddc3a24e
Author: Mark H Weaver <address@hidden>
Date: Fri Apr 19 03:09:37 2019 -0400
Avoid 'with-latin1-locale' in binary I/O tests.
* test-suite/tests/r6rs-ports.test ("put-bytevector [2 args]")
("put-bytevector [3 args]", "put-bytevector [4 args]"): Set the default
port encoding instead of setting the locale.
---
test-suite/tests/r6rs-ports.test | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/test-suite/tests/r6rs-ports.test b/test-suite/tests/r6rs-ports.test
index e6ee10a..5b46ccc 100644
--- a/test-suite/tests/r6rs-ports.test
+++ b/test-suite/tests/r6rs-ports.test
@@ -243,14 +243,13 @@
(put-u8 port 77)
(equal? (get-u8 port) 77)))
- ;; Note: The `put-bytevector' tests below require a Latin-1 locale so
- ;; that the `scm_from_locale_stringn' call in `sf_write' will let all
- ;; the bytes through, unmodified. This is hacky, but we can't use
- ;; "custom binary output ports" here because they're only tested
- ;; later.
+ ;; Note: The `put-bytevector' tests below temporarily set the default
+ ;; port encoding to ISO-8859-1 so that the soft-port will let all the
+ ;; bytes through, unmodified. This is hacky, but we can't use "custom
+ ;; binary output ports" here because they're only tested later.
(pass-if "put-bytevector [2 args]"
- (with-latin1-locale
+ (with-fluids ((%default-port-encoding "ISO-8859-1"))
(let ((port (make-soft-output-port))
(bv (make-bytevector 256)))
(put-bytevector port bv)
@@ -259,7 +258,7 @@
(get-bytevector-n port (bytevector-length bv)))))))
(pass-if "put-bytevector [3 args]"
- (with-latin1-locale
+ (with-fluids ((%default-port-encoding "ISO-8859-1"))
(let ((port (make-soft-output-port))
(bv (make-bytevector 256))
(start 10))
@@ -269,7 +268,7 @@
(get-bytevector-n port (- (bytevector-length bv) start)))))))
(pass-if "put-bytevector [4 args]"
- (with-latin1-locale
+ (with-fluids ((%default-port-encoding "ISO-8859-1"))
(let ((port (make-soft-output-port))
(bv (make-bytevector 256))
(start 10)
- [Guile-commits] 28/55: Documentation fixes, (continued)
- [Guile-commits] 28/55: Documentation fixes, Andy Wingo, 2019/05/23
- [Guile-commits] 42/55: Disable test for current value of setitimer on Cygwin, Andy Wingo, 2019/05/23
- [Guile-commits] 29/55: Fix spelling of ellipsis in (ice-9 match)., Andy Wingo, 2019/05/23
- [Guile-commits] 53/55: put-u8: Always write a single byte, regardless of the port encoding., Andy Wingo, 2019/05/23
- [Guile-commits] 52/55: Optimize fixnum exact integer square roots., Andy Wingo, 2019/05/23
- [Guile-commits] 44/55: Avoid passing NULL to 'memcpy' and 'memcmp'., Andy Wingo, 2019/05/23
- [Guile-commits] 14/55: Fix typos, indentation and error reporting in SRFI-19., Andy Wingo, 2019/05/23
- [Guile-commits] 54/55: Strings, i18n: Limit the use of alloca to approximately 8 kilobytes., Andy Wingo, 2019/05/23
- [Guile-commits] 49/55: Fix typo in comment., Andy Wingo, 2019/05/23
- [Guile-commits] 47/55: Reimplement SCM_MAKE_CHAR to evaluate its argument only once., Andy Wingo, 2019/05/23
- [Guile-commits] 51/55: Avoid 'with-latin1-locale' in binary I/O tests.,
Andy Wingo <=
- [Guile-commits] 15/55: Use 'scm_from_utf8_{string, symbol, keyword}' for C string literals., Andy Wingo, 2019/05/23
- [Guile-commits] 23/55: SRFI-19: Check for incompatible types in time comparisons., Andy Wingo, 2019/05/23
- [Guile-commits] 34/55: Don't mutate read-only string in ports test, Andy Wingo, 2019/05/23
- [Guile-commits] 36/55: Fix strftime compile with null threads, Andy Wingo, 2019/05/23
- [Guile-commits] 25/55: SRFI-19: Minor refactor of leap second table lookups., Andy Wingo, 2019/05/23
- [Guile-commits] 45/55: Update user-visible copyright years., Andy Wingo, 2019/05/23
- [Guile-commits] 46/55: Fix gc.test "after-gc-hook gets called" failures., Andy Wingo, 2019/05/23
- [Guile-commits] 55/55: Update iconv.m4 from gnulib., Andy Wingo, 2019/05/23
- [Guile-commits] 50/55: Fix indentation in scm_sum., Andy Wingo, 2019/05/23
- [Guile-commits] 48/55: Add 'scm_c_make_char' and use it where appropriate., Andy Wingo, 2019/05/23