Debian Codegraph @

test-suite/standalone/test-command-line-encoding

raw
1 #!/bin/sh
2
3 # Choose a UTF-8 locale. The locale doesn't have to be available on the
4 # system since `environ_locale_charset' does not actually try to set it.
5 LC_ALL="en_US.UTF-8"
6 export LC_ALL
7 unset LANG
8 unset LC_CTYPE
9
10 exec guile -q -s "$0" "λ"
11 !#
12
13 ;; Make sure our first argument is a lower-case lambda.
14 ;;
15 ;; Up to Guile 2.0.3 included, command-line arguments would not be converted
16 ;; according to the locale settings; see
17 ;; <http://lists.gnu.org/archive/html/guile-devel/2011-11/msg00026.html> for
18 ;; details.
19 (if (string-contains-ci (setlocale LC_ALL) "utf")
20 (exit (string=? (cadr (program-arguments)) "λ"))
21 ;; If we can't install a UTF-8 locale, skip the test
22 (exit 77))
23
24 ;; Local Variables:
25 ;; mode: scheme
26 ;; coding: utf-8
27 ;; End: