From 14b45af899b92c226bef4713734f997d10d72354 Mon Sep 17 00:00:00 2001 From: guenther <> Date: Wed, 3 Apr 2013 03:11:53 +0000 Subject: Set the stream orientation in open_{,w}memstream(). Check it in the regress test ok mpi@ --- src/regress/lib/libc/orientation/orientation_test.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/regress/lib/libc/orientation/orientation_test.c b/src/regress/lib/libc/orientation/orientation_test.c index 1d0911d12f..2d8fb4fd20 100644 --- a/src/regress/lib/libc/orientation/orientation_test.c +++ b/src/regress/lib/libc/orientation/orientation_test.c @@ -1,4 +1,4 @@ -/* $OpenBSD: orientation_test.c,v 1.3 2011/10/16 14:39:01 stsp Exp $ */ +/* $OpenBSD: orientation_test.c,v 1.4 2013/04/03 03:11:53 guenther Exp $ */ /* * Copyright (c) 2009 Philip Guenther @@ -111,6 +111,8 @@ main(int argc, char *argv[]) { char buffer[BUFSIZ]; wchar_t wbuffer[BUFSIZ]; + char *buf; + wchar_t *wbuf; FILE *f; off_t off; fpos_t pos; @@ -241,6 +243,18 @@ main(int argc, char *argv[]) TEST_WIDE_STD(stdout, wprintf(L"foo")); + /* memory streams */ + f = open_memstream(&buf, &size); + if (!((r = fwide(f, 0)) < 0)) + fail(__LINE__, r, "<", "open_memstream()"); + fclose(f); + f = open_wmemstream(&wbuf, &size); + if (!((r = fwide(f, 0)) > 0)) + fail(__LINE__, r, ">", "open_wmemstream()"); + fclose(f); + + + /* random stuff? */ TEST_UNCHANGED_STD(stderr, perror("foo")); remove(filename); -- cgit v1.2.3-55-g6feb