* PATCH: fix tests under non-usual locale
@ 2006-09-22 19:25 Andrey Borzenkov
2006-09-23 1:17 ` Bart Schaefer
0 siblings, 1 reply; 3+ messages in thread
From: Andrey Borzenkov @ 2006-09-22 19:25 UTC (permalink / raw)
To: zsh-workers
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
this is rather long standing. I do not see any easier way to fix it.
Index: Test/A06assign.ztst
===================================================================
RCS file: /cvsroot/zsh/zsh/Test/A06assign.ztst,v
retrieving revision 1.3
diff -u -p -r1.3 A06assign.ztst
- --- Test/A06assign.ztst 2 Feb 2005 17:03:51 -0000 1.3
+++ Test/A06assign.ztst 22 Sep 2006 19:23:40 -0000
@@ -55,6 +55,13 @@
(( i == 30 ))
0:add to integer
+# According to official printf info page:
+# A floating-point argument must use a period before any fractional
+# digits, but is printed according to the `LC_NUMERIC' category of the
+# current locale.
+# So, force LC_ALL to be C (otherwise it overrides LC_NUMERIC)
+
+ LC_ALL=C LC_NUMERIC=C
float f=3.4
f+=2.3
printf "%g\n" f
Index: Test/B03print.ztst
===================================================================
RCS file: /cvsroot/zsh/zsh/Test/B03print.ztst,v
retrieving revision 1.14
diff -u -p -r1.14 B03print.ztst
- --- Test/B03print.ztst 9 Aug 2005 00:32:58 -0000 1.14
+++ Test/B03print.ztst 22 Sep 2006 19:23:40 -0000
@@ -76,6 +76,8 @@
>123 678
>90 0
+# See A06assign for full explanation
+ LC_ALL=C LC_NUMERIC=C
printf '%g %g\n' 123.45 678 90.1
0:test g format specifier
>123.45 678
Index: Test/E01options.ztst
===================================================================
RCS file: /cvsroot/zsh/zsh/Test/E01options.ztst,v
retrieving revision 1.14
diff -u -p -r1.14 E01options.ztst
- --- Test/E01options.ztst 8 Aug 2005 17:20:12 -0000 1.14
+++ Test/E01options.ztst 22 Sep 2006 19:23:41 -0000
@@ -195,6 +195,8 @@
>8#21
>023
+ # now-a-days cd can easily be localized. Force default (POSIX) locale
+ LC_ALL=C LC_MESSAGES=C
setopt cdablevars
# only absolute paths are eligible for ~-expansion
cdablevar1=tmpcd
@@ -207,8 +209,8 @@
cd cdablevar2
1q:CDABLE_VARS option
>back in options.tmp
- -?(eval):cd:4: no such file or directory: cdablevar1
- -?(eval):cd:10: no such file or directory: cdablevar2
+?(eval):cd:6: no such file or directory: cdablevar1
+?(eval):cd:12: no such file or directory: cdablevar2
# CHASE_DOTS should go with CHASE_LINKS in B01cd.ztst
# which saves me having to write it here.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
iD8DBQFFFDi6R6LMutpd94wRArkYAJ47A6RnSZrG2bjDUbEDxirCU8w3YwCguaDN
JGJqphYz75Yk3i8lq5BjvLk=
=u0T8
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: PATCH: fix tests under non-usual locale
2006-09-22 19:25 PATCH: fix tests under non-usual locale Andrey Borzenkov
@ 2006-09-23 1:17 ` Bart Schaefer
2006-09-23 6:50 ` Andrey Borzenkov
0 siblings, 1 reply; 3+ messages in thread
From: Bart Schaefer @ 2006-09-23 1:17 UTC (permalink / raw)
To: zsh-workers
On Sep 22, 11:25pm, Andrey Borzenkov wrote:
}
} this is rather long standing. I do not see any easier way to fix it.
In Test/ztst.zsh is
# Ensure the locale does not screw up sorting. Don't supply a locale
# unless there's one set, to minimise problems.
[[ -n $LC_ALL ]] && LC_ALL=C
[[ -n $LC_COLLATE ]] && LC_COLLATE=C
[[ -n $LANG ]] && LANG=C
Perhaps this just needs LC_NUMERIC added?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: PATCH: fix tests under non-usual locale
2006-09-23 1:17 ` Bart Schaefer
@ 2006-09-23 6:50 ` Andrey Borzenkov
0 siblings, 0 replies; 3+ messages in thread
From: Andrey Borzenkov @ 2006-09-23 6:50 UTC (permalink / raw)
To: zsh-workers
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Saturday 23 September 2006 05:17, Bart Schaefer wrote:
> On Sep 22, 11:25pm, Andrey Borzenkov wrote:
> }
> } this is rather long standing. I do not see any easier way to fix it.
>
> In Test/ztst.zsh is
>
> # Ensure the locale does not screw up sorting. Don't supply a locale
> # unless there's one set, to minimise problems.
> [[ -n $LC_ALL ]] && LC_ALL=C
> [[ -n $LC_COLLATE ]] && LC_COLLATE=C
> [[ -n $LANG ]] && LANG=C
>
>
> Perhaps this just needs LC_NUMERIC added?
>
Oh right. And LC_MESSAGES too. Thank you.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
iD8DBQFFFNlLR6LMutpd94wRAlYfAJ98/2OwQN38o9nzfhVC+ci5JRj7zQCfZYc6
+IAzH4hjyLpsE9bcegzsHpY=
=sHCe
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-09-23 6:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-09-22 19:25 PATCH: fix tests under non-usual locale Andrey Borzenkov
2006-09-23 1:17 ` Bart Schaefer
2006-09-23 6:50 ` Andrey Borzenkov
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).