[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
make tests: Locale and whitespaces, ENHANCEMENT
From: |
王铭烨 |
Subject: |
make tests: Locale and whitespaces, ENHANCEMENT |
Date: |
Tue, 30 Jun 2015 01:05:45 +0800 |
Configuration Information:
Machine: x86_64
OS: cygwin
Compiler: gcc
Compilation CFLAGS: -DPROGRAM='bash.exe' -DCONF_HOSTTYPE='x86_64'
-DCONF_OSTYPE='cygwin' -DCONF_MACHTYPE='x86_64-unknown-cygwin'
-DCONF_VENDOR='unknown' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash'
-DSHELL -DHAVE_CONFIG_H -DRECYCLES_PIDS -I.
-I/usr/src/bash-4.3.39-2.x86_64/src/bash-4.3
-I/usr/src/bash-4.3.39-2.x86_64/src/bash-4.3/include
-I/usr/src/bash-4.3.39-2.x86_64/src/bash-4.3/lib -DWORDEXP_OPTION -ggdb -O2
-pipe -Wimplicit-function-declaration
-fdebug-prefix-map=/usr/src/bash-4.3.39-2.x86_64/build=/usr/src/debug/bash-4.3.39-2
-fdebug-prefix-map=/usr/src/bash-4.3.39-2.x86_64/src/bash-4.3=/usr/src/debug/bash-4.3.39-2
uname output: CYGWIN_NT-6.3 VAIO-lynn 2.0.4(0.287/5/3) 2015-06-09 12:22 x86_64
Cygwin
Machine Type: x86_64-unknown-cygwin
Description:
With the current version of bash source, when `make tests` or `cd
tests; sh run-all` is invoked, bash reports several differences in locale
messages which can all be
reduced by adding a line like `export LC_ALL=c` in `tests/run-all`.
The `run-intl` test also, asks the user to manually ignore whitespace
differences, but it can be ignored with `diff -w`.
Repeat-By:
1. Get a non-C-locale environment, say `LC_ALL=de_DE.UTF-8` or
`LC_ALL=zh_CN.UTF-8`.
2. Type `make tests`. On Cygwin where ld fails with all those missing
`setsigjmp` symbols, I forced it using `ln -s /bin/bash.exe .`.
3. Sit back and see.
Here I am using the `de` locale instead of `zh` which I use, so most of
the characters used would be in the ASCII set and it can display properly in
more places.
$ LC_ALL=de_DE.UTF-8 THIS_SH=$BASH sh run-alias
3c3
< ./alias.tests: Zeile 25: qfoo: Kommando nicht gefunden.
---
> ./alias.tests: line 25: qfoo: command not found
Fix:
Already mentioned in description.
Notes:
`grep -Er '(LC_ALL|LANG)' . | cut -d: -f 1 | cut -c 3- | sed -e
's/\..*//g' -e 's/[0-9]$//g' | uniq | tr '\n' ' '` tells me that the following
test files handles the locale stuffs somehow:
dstack errors execscript globstar histexp intl new-exp posixpat printf
redir source unicode
But there is still some way to go.
- make tests: Locale and whitespaces, ENHANCEMENT,
王铭烨 <=