diff options
author | Otto Moerbeek <otto@cvs.openbsd.org> | 2004-09-16 20:22:27 +0000 |
---|---|---|
committer | Otto Moerbeek <otto@cvs.openbsd.org> | 2004-09-16 20:22:27 +0000 |
commit | d9b9fef148fde9b9906d83b4c81d47ad5a3881e3 (patch) | |
tree | cb2f97ed5797526a3f649b344a5fb26642f05cb2 /regress | |
parent | 4935345814eda1bd402d8cd1aa169c060f26bf38 (diff) |
Test ll's with positional args.
Diffstat (limited to 'regress')
-rw-r--r-- | regress/lib/libc/sprintf/sprintf_test.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/regress/lib/libc/sprintf/sprintf_test.c b/regress/lib/libc/sprintf/sprintf_test.c index 76dd42c9299..cb93868b60a 100644 --- a/regress/lib/libc/sprintf/sprintf_test.c +++ b/regress/lib/libc/sprintf/sprintf_test.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sprintf_test.c,v 1.2 2003/09/02 23:52:16 david Exp $ */ +/* $OpenBSD: sprintf_test.c,v 1.3 2004/09/16 20:22:26 otto Exp $ */ /* * Copyright (c) 2003 Theo de Raadt @@ -45,7 +45,8 @@ char correct[] = "|xx 29 30 31 32\n" "|xx 33 34 35 36\n" "|xx 37 38 39 40\n" - "|xx 41 42 43 44\n"; + "|xx 41 42 43 44\n" + "|xx 45 -1 1 -1 1\n"; int main(int argc, char *argv[]) @@ -64,7 +65,8 @@ main(int argc, char *argv[]) "|xx %29$s %30$s %31$s %32$s\n" "|xx %33$s %34$s %35$s %36$s\n" "|xx %37$s %38$s %39$s %40$s\n" - "|xx %41$s %42$s %43$s %44$s\n", + "|xx %41$s %42$s %43$s %44$s\n" + "|xx %45$d %46$ld %47$lld %48$d %49$lld\n", "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", @@ -72,9 +74,10 @@ main(int argc, char *argv[]) "25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "40", "41", "42", - "43", "44" + "43", "44", 45, -1L, 1LL, -1, 1LL ); + printf(buf); if (strcmp(buf, correct) == 0) exit(0); exit(1); |