From 4e576c069c36bd31c6bbd57ba661361cb29274c9 Mon Sep 17 00:00:00 2001 From: Andrey Borzenkov Date: Fri, 22 Sep 2006 19:34:05 +0000 Subject: 22758: fix tests by setting locale to C --- Test/A06assign.ztst | 7 +++++++ Test/B03print.ztst | 2 ++ Test/E01options.ztst | 6 ++++-- 3 files changed, 13 insertions(+), 2 deletions(-) (limited to 'Test') diff --git a/Test/A06assign.ztst b/Test/A06assign.ztst index bbed909c5..ec5331bd0 100644 --- a/Test/A06assign.ztst +++ b/Test/A06assign.ztst @@ -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 diff --git a/Test/B03print.ztst b/Test/B03print.ztst index d6dea5a3d..3dcb4e74a 100644 --- a/Test/B03print.ztst +++ b/Test/B03print.ztst @@ -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 diff --git a/Test/E01options.ztst b/Test/E01options.ztst index da4020c15..f407ecb6b 100644 --- a/Test/E01options.ztst +++ b/Test/E01options.ztst @@ -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. -- cgit 1.4.1