sed testsuite, LANG vs LC_ALL

View: New views
2 Messages — Rating Filter:   Alert me  

sed testsuite, LANG vs LC_ALL

by Bugzilla from urkud.urkud@gmail.com :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi!

sed testsuite fails if LC_ALL=C and ru_RU.UTF-8 locale is installed. After sed
-e 's/LANG/LC_ALL' -i testsuite/Makefile.tests all tests passed. The patch is
attached.
--
Yury G. Kudryashov,
mailto: urkud.urkud@...

[sed-lc-all.patch]

diff --git a/testsuite/Makefile.tests b/testsuite/Makefile.tests
index 1f04290..c0910dc 100644
--- a/testsuite/Makefile.tests
+++ b/testsuite/Makefile.tests
@@ -34,16 +34,16 @@ y-bracket y-newline insert brackets::
  @$(RM) $@.out
 
 badenc::
- LANG=ru_RU.UTF-8 $(TIME) $(SED) -nf $(srcdir)/$@.sed \
+ LC_ALL=ru_RU.UTF-8 $(TIME) $(SED) -nf $(srcdir)/$@.sed \
  < $(srcdir)/$@.inp | $(TR) -d \\r > $@.out
  $(CMP) $(srcdir)/$@.good $@.out
- LANG=it_IT.UTF-8 $(TIME) $(SED) -nf $(srcdir)/$@.sed \
+ LC_ALL=it_IT.UTF-8 $(TIME) $(SED) -nf $(srcdir)/$@.sed \
  < $(srcdir)/$@.inp | $(TR) -d \\r > $@.out
  $(CMP) $(srcdir)/$@.good $@.out
- LANG=en_US.UTF-8 $(TIME) $(SED) -nf $(srcdir)/$@.sed \
+ LC_ALL=en_US.UTF-8 $(TIME) $(SED) -nf $(srcdir)/$@.sed \
  < $(srcdir)/$@.inp | $(TR) -d \\r > $@.out
  $(CMP) $(srcdir)/$@.good $@.out
- LANG=en_GB.UTF-8 $(TIME) $(SED) -nf $(srcdir)/$@.sed \
+ LC_ALL=en_GB.UTF-8 $(TIME) $(SED) -nf $(srcdir)/$@.sed \
  < $(srcdir)/$@.inp | $(TR) -d \\r > $@.out
  $(CMP) $(srcdir)/$@.good $@.out
  @$(RM) $@.out
@@ -51,10 +51,10 @@ badenc::
 # Try with ru_RU.UTF-8.  If it is presumably not installed, see if the current
 # locale is UTF-8 and run it in the current locale.
 utf8-1 utf8-2 utf8-3 utf8-4::
- echo "LANG=ru_RU.UTF-8" \
+ echo "LC_ALL=ru_RU.UTF-8" \
   "$(TIME) $(SED) -f $(srcdir)/$@.sed" \
   "< $(srcdir)/$@.inp | $(TR) -d \\r > $@.out"; \
- LANG=ru_RU.UTF-8 \
+ LC_ALL=ru_RU.UTF-8 \
   $(TIME) $(SED) -f $(srcdir)/$@.sed \
  < $(srcdir)/$@.inp | $(TR) -d \\r > $@.out; \
  $(CMP) $(srcdir)/$@.good $@.out && exit 0; \



signature.asc (205 bytes) Download Attachment

Re: sed testsuite, LANG vs LC_ALL

by Paolo Bonzini-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 10/13/2009 11:53 AM, Yury G. Kudryashov wrote:
> Hi!
>
> sed testsuite fails if LC_ALL=C and ru_RU.UTF-8 locale is installed. After sed
> -e 's/LANG/LC_ALL' -i testsuite/Makefile.tests all tests passed. The patch is
> attached.

Applied, thanks.

Paolo