mirror of
git://sourceware.org/git/glibc.git
synced 2024-11-27 03:41:23 +08:00
* stdio-common/tstscanf.c (main): Add two testcases for '*'
modifier.
This commit is contained in:
parent
5b6bed491f
commit
ab9e927a75
@ -1,4 +1,4 @@
|
|||||||
/* Copyright (C) 1991, 92, 96, 97, 98, 99, 2000 Free Software Foundation, Inc.
|
/* Copyright (C) 1991,92,96,97,98,99,2000,2001 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
@ -305,5 +305,32 @@ main (int argc, char **argv)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fputs ("Test 11:\n", stdout);
|
||||||
|
{
|
||||||
|
char uart[50];
|
||||||
|
int res;
|
||||||
|
|
||||||
|
res = sscanf ("uart:16550A tx:0", "uart:%31s tx:%*u", uart);
|
||||||
|
if (res != 1)
|
||||||
|
{
|
||||||
|
fputs ("test failed!\n", stdout);
|
||||||
|
result = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fputs ("Test 12:\n", stdout);
|
||||||
|
{
|
||||||
|
char uart[50];
|
||||||
|
int res;
|
||||||
|
|
||||||
|
res = sscanf ("uart:16550A", "uart:%31s tx:%*u", uart);
|
||||||
|
if (res != 1)
|
||||||
|
{
|
||||||
|
fputs ("test failed!\n", stdout);
|
||||||
|
result = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user