diff options
author | otto <> | 2004-09-16 20:22:26 +0000 |
---|---|---|
committer | otto <> | 2004-09-16 20:22:26 +0000 |
commit | 0fa4ed451a50f94cd114f54c2abdd0272c7b68c5 (patch) | |
tree | 73ed7434ae9a20d1af17f7fe49b9baa59900cdba /src/regress/lib/libc/sprintf/sprintf_test.c | |
parent | ae87b0a7f6594b8bdaa47691da301cdac965f0c7 (diff) | |
download | openbsd-0fa4ed451a50f94cd114f54c2abdd0272c7b68c5.tar.gz openbsd-0fa4ed451a50f94cd114f54c2abdd0272c7b68c5.tar.bz2 openbsd-0fa4ed451a50f94cd114f54c2abdd0272c7b68c5.zip |
Test ll's with positional args.
Diffstat (limited to 'src/regress/lib/libc/sprintf/sprintf_test.c')
-rw-r--r-- | src/regress/lib/libc/sprintf/sprintf_test.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/regress/lib/libc/sprintf/sprintf_test.c b/src/regress/lib/libc/sprintf/sprintf_test.c index 76dd42c929..cb93868b60 100644 --- a/src/regress/lib/libc/sprintf/sprintf_test.c +++ b/src/regress/lib/libc/sprintf/sprintf_test.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: sprintf_test.c,v 1.2 2003/09/02 23:52:16 david Exp $ */ | 1 | /* $OpenBSD: sprintf_test.c,v 1.3 2004/09/16 20:22:26 otto Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Copyright (c) 2003 Theo de Raadt | 4 | * Copyright (c) 2003 Theo de Raadt |
@@ -45,7 +45,8 @@ char correct[] = | |||
45 | "|xx 29 30 31 32\n" | 45 | "|xx 29 30 31 32\n" |
46 | "|xx 33 34 35 36\n" | 46 | "|xx 33 34 35 36\n" |
47 | "|xx 37 38 39 40\n" | 47 | "|xx 37 38 39 40\n" |
48 | "|xx 41 42 43 44\n"; | 48 | "|xx 41 42 43 44\n" |
49 | "|xx 45 -1 1 -1 1\n"; | ||
49 | 50 | ||
50 | int | 51 | int |
51 | main(int argc, char *argv[]) | 52 | main(int argc, char *argv[]) |
@@ -64,7 +65,8 @@ main(int argc, char *argv[]) | |||
64 | "|xx %29$s %30$s %31$s %32$s\n" | 65 | "|xx %29$s %30$s %31$s %32$s\n" |
65 | "|xx %33$s %34$s %35$s %36$s\n" | 66 | "|xx %33$s %34$s %35$s %36$s\n" |
66 | "|xx %37$s %38$s %39$s %40$s\n" | 67 | "|xx %37$s %38$s %39$s %40$s\n" |
67 | "|xx %41$s %42$s %43$s %44$s\n", | 68 | "|xx %41$s %42$s %43$s %44$s\n" |
69 | "|xx %45$d %46$ld %47$lld %48$d %49$lld\n", | ||
68 | "01", "02", "03", "04", "05", "06", | 70 | "01", "02", "03", "04", "05", "06", |
69 | "07", "08", "09", "10", "11", "12", | 71 | "07", "08", "09", "10", "11", "12", |
70 | "13", "14", "15", "16", "17", "18", | 72 | "13", "14", "15", "16", "17", "18", |
@@ -72,9 +74,10 @@ main(int argc, char *argv[]) | |||
72 | "25", "26", "27", "28", "29", "30", | 74 | "25", "26", "27", "28", "29", "30", |
73 | "31", "32", "33", "34", "35", "36", | 75 | "31", "32", "33", "34", "35", "36", |
74 | "37", "38", "39", "40", "41", "42", | 76 | "37", "38", "39", "40", "41", "42", |
75 | "43", "44" | 77 | "43", "44", 45, -1L, 1LL, -1, 1LL |
76 | ); | 78 | ); |
77 | 79 | ||
80 | printf(buf); | ||
78 | if (strcmp(buf, correct) == 0) | 81 | if (strcmp(buf, correct) == 0) |
79 | exit(0); | 82 | exit(0); |
80 | exit(1); | 83 | exit(1); |