1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-08-07 06:43:00 +03:00
1999-05-07  Ulrich Drepper  <drepper@cygnus.com>

	* stdio-common/tst-printf.c: Add test case for last _itoa problem.

	* stdio-common/vfprintf.c: Fix typo.
This commit is contained in:
Ulrich Drepper
1999-05-07 11:32:00 +00:00
parent 7bcaca4384
commit 31c46cf53d
3 changed files with 27 additions and 6 deletions

View File

@@ -1,4 +1,4 @@
/* Copyright (C) 1991, 92, 93, 95, 96, 97, 98 Free Software Foundation, Inc.
/* Copyright (C) 1991,92,93,95,96,97,98,99 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
@@ -132,6 +132,7 @@ main (int argc, char *argv[])
static char shortstr[] = "Hi, Z.";
static char longstr[] = "Good morning, Doctor Chandra. This is Hal. \
I am ready for my first lesson today.";
int result = 0;
fmtchk("%.4x");
fmtchk("%04x");
@@ -237,16 +238,30 @@ I am ready for my first lesson today.";
{
char buf[200];
int result;
sprintf(buf,"%*s%*s%*s",-1,"one",-20,"two",-30,"three");
result = strcmp (buf,
"onetwo three ");
result |= strcmp (buf,
"onetwo three ");
puts (result != 0 ? "Test failed!" : "Test ok.");
return result != 0;
}
{
char buf[200];
sprintf (buf, "%07Lo", 040000000000ll);
printf ("sprintf (buf, \"%%07Lo\", 040000000000ll) = %s\n", buf);
if (strcmp (buf, "40000000000") != 0)
{
result = 1;
fputs ("\tFAILED", stdout);
}
puts ("");
}
return result != 0;
}
void