This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix UTF-8.exp for non-multibyte targets


Patch applied.

-- Jeff J.

----- Original Message -----
> From: Yuriy Kolerov <yuriy.kolerov@synopsys.com>
> 
> Don't run UTF-8.exp test if newlib is not built with multibyte support.
> 
> Submitted on behalf of Yuriy Kolerov.
> 
> newlib/ChangeLog
> 
> 2016-04-29  Yuriy Kolerov <yuriy.kolerov@synopsys.com>
> 
> 	testsuite/newlib.locale/UTF-8.exp: Don't run if multibyte support is
> 	disabled.
> 
> Signed-off-by: Yuriy Kolerov <yuriy.kolerov@synopsys.com>
> Signed-off-by: Anton Kolesov <anton.kolesov@synopsys.com>
> ---
>  newlib/testsuite/newlib.locale/UTF-8.exp | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/newlib/testsuite/newlib.locale/UTF-8.exp
> b/newlib/testsuite/newlib.locale/UTF-8.exp
> index e823a4f..94fcb5f 100644
> --- a/newlib/testsuite/newlib.locale/UTF-8.exp
> +++ b/newlib/testsuite/newlib.locale/UTF-8.exp
> @@ -6,6 +6,18 @@
>  
>  load_lib checkoutput.exp
>  
> +# Don't run this test if newlib's build does not support multibyte
> encodings.
> +set newlib_header_name "$objdir/targ-include/newlib.h"
> +if [file exists $newlib_header_name] {
> +    set newlib_header_fid [open $newlib_header_name r]
> +    set newlib_header_text [read $newlib_header_fid]
> +    close $newlib_header_fid
> +    if {![regexp "#define _MB_CAPABLE" $newlib_header_text] || \
> +            [regexp "#define _MB_LEN_MAX 1" $newlib_header_text]} {
> +        return
> +    }
> +}
> +
>  set expected_output {
>  "Set C-UTF-8 locale."
>  "* U-00000000"
> --
> 2.8.1
> 
> 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]