mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-08 17:42:12 +03:00
string: Make tst-strerror/tst-strsignal unsupported if msgfmt is not installed
Without msgfmt libc.mo files are not generated and its loading failure is silent ignored with xsetlocale. Also unset LANGUAGE environment variable to avoid it taking precedence when loading the message catalog. Although not strictly required (since the test is issued with test-container and it sets a strict environment variable) it follows other tests that deal with translation. Checked on x86_64-linux-gnu.
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
#include <locale.h>
|
||||
#include <array_length.h>
|
||||
@@ -29,6 +30,8 @@
|
||||
static int
|
||||
do_test (void)
|
||||
{
|
||||
unsetenv ("LANGUAGE");
|
||||
|
||||
xsetlocale (LC_ALL, "C");
|
||||
|
||||
TEST_COMPARE_STRING (strerror (EINVAL), "Invalid argument");
|
||||
|
Reference in New Issue
Block a user