Datasets:

License:
guile-bootstrap / guile /test-suite /standalone /test-command-line-encoding
mike dupont
update
3dcad1f
raw
history blame contribute delete
754 Bytes
#!/bin/sh
# Choose a UTF-8 locale. The locale doesn't have to be available on the
# system since `environ_locale_charset' does not actually try to set it.
LC_ALL="en_US.UTF-8"
export LC_ALL
unset LANG
unset LC_CTYPE
exec guile -q -s "$0" "位"
!#
;; Make sure our first argument is a lower-case lambda.
;;
;; Up to Guile 2.0.3 included, command-line arguments would not be converted
;; according to the locale settings; see
;; <http://lists.gnu.org/archive/html/guile-devel/2011-11/msg00026.html> for
;; details.
(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
;; coding: utf-8
;; End: