From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi1-x236.google.com (mail-oi1-x236.google.com [IPv6:2607:f8b0:4864:20::236]) by sourceware.org (Postfix) with ESMTPS id 1F0963858D32 for ; Mon, 2 Oct 2023 19:38:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1F0963858D32 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-oi1-x236.google.com with SMTP id 5614622812f47-3af6cd01323so78058b6e.3 for ; Mon, 02 Oct 2023 12:38:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1696275510; x=1696880310; darn=sourceware.org; h=content-transfer-encoding:in-reply-to:organization:from:references :to:content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=HF5g2lfb81Kr0lu8KstB72GDbNp4odFXAabLXoMZ4rA=; b=o1VHxuCeZnnlAUxKqo41SnmnFdvJq8ibOt1n8sVwq9+ePFbVwiZnlryAOCFcNnZBki YJzatSUTmHNIQAHoYuKkzI7Kh3rfeVRqNMRVAuO3J1KM3WQKK35p19Ncs0Y5q9Zpeh/8 BmjiM+Weuo45uc1FBgqCivc3GENf44ia0JyuwLz6MzyrKWHPOc9jGOKw8fw+sKLxTUhw tZTgap4wmZmfTc5KRijMAgBm/qNooEw3M3xVzQGS36uvj+LQr4swa0a4vFU6XhoZu6yq 8atvN6CII9jEFTr7J8RJ7RBHo9KeQasJUMez78ckwBccmMCpJ6zTiKl2aJVyj6/nKOIV AsLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696275510; x=1696880310; h=content-transfer-encoding:in-reply-to:organization:from:references :to:content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=HF5g2lfb81Kr0lu8KstB72GDbNp4odFXAabLXoMZ4rA=; b=q+W+fZQYCJzxoZiwC/bQCNM/l7CZa0b6dxjV0lkubDi+lINl+9LiPalt/VkE++xJJj ermwT2g7un97R3TM4a2vjUKUqFqR5Gb8Gd3DABuwKclE35K5uJpOC1DdukNAfizXGRuo JGtwLX2YeTRMMUIIZj2xKQ5zY1ZYXv32vPvI9q/a4JVqtQ9Vuk0AoXDPvWZj724bJtOJ sjpxZoRzUsi48Xgp/Nw8GxejqsptFGfOjBVJJCw8KEJZPNvQ6xBPCSF4Vsl/+jxO30gm 1Ogjnwc6aV5MZYL7lHmpz4RaOgB9Yn/4TtsL6JQS5PLoiQR3NgBfjQd2EaZ4ouqbuITr tZaQ== X-Gm-Message-State: AOJu0Yxc254DqEx2BvpLxMwu6zGP6sVXBEx4NprDsV/M8v5YeFKQB30V QxoV7jfDse8ZTfnhPfGXVYcIEw== X-Google-Smtp-Source: AGHT+IH1POwIRkP8KZ+YVAspkXw3yBa5Aq7ywOTrHILLMum51Ekr4Y3dC9tpJKgkgYXWu/rKwPkxGA== X-Received: by 2002:a05:6808:1382:b0:3a7:39f6:3f2c with SMTP id c2-20020a056808138200b003a739f63f2cmr16720465oiw.55.1696275510444; Mon, 02 Oct 2023 12:38:30 -0700 (PDT) Received: from ?IPV6:2804:1b3:a7c1:feaf:9c9c:46fb:1bba:fa15? ([2804:1b3:a7c1:feaf:9c9c:46fb:1bba:fa15]) by smtp.gmail.com with ESMTPSA id e12-20020a63db0c000000b00553dcfc2179sm19684634pgg.52.2023.10.02.12.38.29 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 02 Oct 2023 12:38:29 -0700 (PDT) Message-ID: <6caacdf3-78c1-4f56-a918-8f46402b2890@linaro.org> Date: Mon, 2 Oct 2023 16:38:27 -0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] intl: Add test case for bug 16621 Content-Language: en-US To: Florian Weimer , libc-alpha@sourceware.org References: <87o7iiukpt.fsf@oldenburg3.str.redhat.com> From: Adhemerval Zanella Netto Organization: Linaro In-Reply-To: <87o7iiukpt.fsf@oldenburg3.str.redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-12.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,KAM_NUMSUBJECT,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: LGTM, thanks. Reviewed-by: Adhemerval Zanella On 04/09/23 10:33, Florian Weimer via Libc-alpha wrote: > --- > intl/Makefile | 6 +++++- > intl/tst-gettext-c-utf8.c | 37 +++++++++++++++++++++++++++++++++++++ > 2 files changed, 42 insertions(+), 1 deletion(-) > > diff --git a/intl/Makefile b/intl/Makefile > index d7223256eb..a6dd138dad 100644 > --- a/intl/Makefile > +++ b/intl/Makefile > @@ -32,7 +32,10 @@ test-srcs := tst-gettext tst-translit tst-gettext2 tst-codeset tst-gettext3 > ifeq ($(have-thread-library),yes) > test-srcs += $(multithread-test-srcs) > endif > -tests = tst-ngettext > +tests = \ > + tst-gettext-c-utf8 \ > + tst-ngettext \ > + # tests > > before-compile += $(objpfx)msgs.h > > @@ -117,6 +120,7 @@ $(objpfx)tst-gettext3.out: $(gen-locales) > $(objpfx)tst-gettext4.out: $(gen-locales) > $(objpfx)tst-gettext5.out: $(gen-locales) > $(objpfx)tst-gettext6.out: $(gen-locales) > +$(objpfx)tst-gettext-c-utf8.out: $(gen-locales) > $(objpfx)tst-translit.out: $(gen-locales) > endif > > diff --git a/intl/tst-gettext-c-utf8.c b/intl/tst-gettext-c-utf8.c > new file mode 100644 > index 0000000000..bdb9b5396c > --- /dev/null > +++ b/intl/tst-gettext-c-utf8.c > @@ -0,0 +1,37 @@ > +/* Check that C.UTF-8 uses C translations (bug 16621). > + Copyright (C) 2021-2023 Free Software Foundation, Inc. > + This file is part of the GNU C Library. > + > + The GNU C Library is free software; you can redistribute it and/or > + modify it under the terms of the GNU Lesser General Public > + License as published by the Free Software Foundation; either > + version 2.1 of the License, or (at your option) any later version. > + > + The GNU C Library is distributed in the hope that it will be useful, > + but WITHOUT ANY WARRANTY; without even the implied warranty of > + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > + Lesser General Public License for more details. > + > + You should have received a copy of the GNU Lesser General Public > + License along with the GNU C Library; if not, see > + . */ > + > +#include > +#include > +#include > +#include > +#include > + > +static int > +do_test (void) > +{ > + if (setenv ("LANGUAGE", "de_DE.UTF-8", 1) != 0) > + FAIL_EXIT1 ("setenv"); > + if (setenv ("LC_ALL", "C.UTF-8", 1) != 0) > + FAIL_EXIT1 ("setenv"); > + xsetlocale (LC_ALL, ""); > + TEST_COMPARE_STRING (strerror (ENOENT), "No such file or directory"); > + return 0; > +} > + > +#include > > base-commit: 2897b231a6b71ee17d47d3d63f1112b2641a476c >