HelenOS sources
SPRINTF_TEST 54 uspace/lib/c/test/sprintf.c SPRINTF_TEST(no_formatting, "This is a test.", "This is a test.");
SPRINTF_TEST 56 uspace/lib/c/test/sprintf.c SPRINTF_TEST(string_plain, "some text", "%s", "some text");
SPRINTF_TEST 58 uspace/lib/c/test/sprintf.c SPRINTF_TEST(string_dynamic_width, " tex", "%*.*s", 5, 3, "text");
SPRINTF_TEST 60 uspace/lib/c/test/sprintf.c SPRINTF_TEST(string_dynamic_width_align_left, "text ", "%-*.*s", 7, 7, "text");
SPRINTF_TEST 62 uspace/lib/c/test/sprintf.c SPRINTF_TEST(string_pad, " text", "%8.10s", "text");
SPRINTF_TEST 64 uspace/lib/c/test/sprintf.c SPRINTF_TEST(string_pad_but_cut, " very lon", "%10.8s", "very long text");
SPRINTF_TEST 66 uspace/lib/c/test/sprintf.c SPRINTF_TEST(char_basic, "[a]", "[%c]", 'a');
SPRINTF_TEST 68 uspace/lib/c/test/sprintf.c SPRINTF_TEST(int_various_padding, "[1] [ 02] [03 ] [004] [005]",
SPRINTF_TEST 72 uspace/lib/c/test/sprintf.c SPRINTF_TEST(int_negative_various_padding, "[-1] [-02] [-03] [-004] [-005]",
SPRINTF_TEST 76 uspace/lib/c/test/sprintf.c SPRINTF_TEST(long_negative_various_padding, "[-1] [-02] [-03] [-004] [-005]",
SPRINTF_TEST 81 uspace/lib/c/test/sprintf.c SPRINTF_TEST(int_as_hex, "[0x11] [0x012] [0x013] [0x00014] [0x00015]",
HelenOS homepage, sources at GitHub