summaryrefslogtreecommitdiff
path: root/unittest/mysys
diff options
context:
space:
mode:
authorGeorgi Kodinov <Georgi.Kodinov@Oracle.com>2010-10-04 15:42:16 +0300
committerGeorgi Kodinov <Georgi.Kodinov@Oracle.com>2010-10-04 15:42:16 +0300
commit8789c7972339340feb6a49903ff247de580bc5dd (patch)
tree0b41fbab5c8e486500b5c53bbe818e62f6f583f2 /unittest/mysys
parent5f9c629da0c08cd742a16419f4f66cdb18505302 (diff)
parent40ee088f68a452ac2ed19622481c73d6d38c7ec3 (diff)
downloadmariadb-git-8789c7972339340feb6a49903ff247de580bc5dd.tar.gz
merge
Diffstat (limited to 'unittest/mysys')
-rw-r--r--unittest/mysys/my_vsnprintf-t.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/unittest/mysys/my_vsnprintf-t.c b/unittest/mysys/my_vsnprintf-t.c
index 4ef6c310c8f..e7f37774f85 100644
--- a/unittest/mysys/my_vsnprintf-t.c
+++ b/unittest/mysys/my_vsnprintf-t.c
@@ -31,7 +31,7 @@ void test1(const char *res, const char *fmt, ...)
int main(void)
{
- plan(54);
+ plan(58);
test1("Constant string",
"Constant string");
@@ -44,6 +44,8 @@ int main(void)
"Format specifier c %c", '!');
test1("Format specifier d 1",
"Format specifier d %d", 1);
+ test1("Format specifier i 1",
+ "Format specifier i %i", 1);
test1("Format specifier u 2",
"Format specifier u %u", 2);
test1("Format specifier o 375",
@@ -77,6 +79,9 @@ int main(void)
test1("Length modifiers work: 1 * -1 * 2 * 3",
"Length modifiers work: %d * %ld * %lld * %zd", 1, -1L, 2LL, (size_t)3);
+ test1("Length modifiers work: 1 * -1 * 2 * 3",
+ "Length modifiers work: %i * %li * %lli * %zd", 1, -1L, 2LL, (size_t)3);
+
test1("long long X: 123456789abcdef0",
"long long X: %llx", 0x123456789abcdef0LL);
@@ -121,6 +126,10 @@ int main(void)
"Hello int, %d", 1);
test1("Hello int, -1",
"Hello int, %d", -1);
+ test1("Hello int, 1",
+ "Hello int, %i", 1);
+ test1("Hello int, -1",
+ "Hello int, %i", -1);
test1("Hello string 'I am a string'",
"Hello string '%s'", "I am a string");
test1("Hello hack hack hack hack hack hack hack 1",