mirror of
https://git.savannah.gnu.org/git/make.git
synced 2025-12-17 00:02:12 -05:00
Get error messages in the C locale for comparision with make output.
Fixes Savannah bug #35764.
This commit is contained in:
parent
7d3743dfdc
commit
90ee335724
@ -1,5 +1,8 @@
|
|||||||
2012-09-09 Paul Smith <psmith@gnu.org>
|
2012-09-09 Paul Smith <psmith@gnu.org>
|
||||||
|
|
||||||
|
* scripts/functions/file: Get errors in the C locale, not the
|
||||||
|
current locale. Fixes Savannah bug #35764.
|
||||||
|
|
||||||
* scripts/features/escape: Check that backslashes before
|
* scripts/features/escape: Check that backslashes before
|
||||||
non-special characters are not removed.
|
non-special characters are not removed.
|
||||||
|
|
||||||
|
|||||||
@ -35,9 +35,16 @@ touch('file.out');
|
|||||||
chmod(0444, 'file.out');
|
chmod(0444, 'file.out');
|
||||||
|
|
||||||
# Find the error that will be printed
|
# Find the error that will be printed
|
||||||
|
# This seems complicated, but we need the message from the C locale
|
||||||
|
my $loc = undef;
|
||||||
|
if ($has_POSIX) {
|
||||||
|
$loc = POSIX::setlocale(POSIX::LC_MESSAGES);
|
||||||
|
POSIX::setlocale(POSIX::LC_MESSAGES, 'C');
|
||||||
|
}
|
||||||
my $e;
|
my $e;
|
||||||
open(my $F, '>', 'file.out') and die "Opened read-only file!\n";
|
open(my $F, '>', 'file.out') and die "Opened read-only file!\n";
|
||||||
$e = "$!";
|
$e = "$!";
|
||||||
|
$loc and POSIX::setlocale(POSIX::LC_MESSAGES, $loc);
|
||||||
|
|
||||||
run_make_test(q!
|
run_make_test(q!
|
||||||
define A
|
define A
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user