mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-23 05:42:29 +00:00
* Implement S conversion specifier for printf-related functions POSIX specifies that a conversion specifier of S must be interpreted the same way as %ls. This patch implements this. * clang-format --------- Co-authored-by: Gavin Hayes <gavin@computoid.com>
This commit is contained in:
parent
58b2f9bd6b
commit
2d6ea2fbc9
2 changed files with 10 additions and 0 deletions
|
@ -64,6 +64,11 @@ TEST(fmt, d) {
|
|||
EXPECT_STREQ("-2147483648", _gc(xasprintf("% d", INT_MIN)));
|
||||
}
|
||||
|
||||
TEST(fmt, s) {
|
||||
EXPECT_STREQ("Wide character output test",
|
||||
_gc(xasprintf("%S", L"Wide character output test")));
|
||||
}
|
||||
|
||||
TEST(fmt, g) {
|
||||
EXPECT_STREQ("1", _gc(xasprintf("%g", 1.)));
|
||||
EXPECT_STREQ(" 1", _gc(xasprintf("% g", 1.)));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue