Piotr Caban
b0ab1b7602
msvcrt: Implement opening Unicode files with no BOM in _wsopen_dispatch.
...
Spotted by Alistair Leslie-Hughes.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-26 23:25:24 +01:00
Piotr Caban
855668221d
msvcrt: Reset buffer in fflush on error.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-12 17:16:26 +02:00
Jacek Caban
22315440fc
include: Use long type for __msvcrt_long when possible.
...
Based on patch by Chip Davis.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-23 09:21:53 +02:00
Francois Gouget
a909baeb4e
tests: Report all errors when failing to wait for a child process.
...
Report the line number where the test failed to wait for the child so
one can identify which child process did not behave as expected.
Also wait_child_process() is meant for the general case so report
all non-crash error cases as test failures so they are accounted for.
Omit the "winetest_" prefix to match the other Wine test functions and
so the underlying winetest_wait_child_process() function can be wrapped
with the usual line-capturing macros.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48651
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-17 10:51:44 +01:00
Francois Gouget
c2e6f4deeb
msvcrt/tests: Simplify the name of the test unit for child processes.
...
The official name (shown by --list) has no path nor extension.
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-21 09:12:57 +01:00
Alexandre Julliard
d33504b9bb
kernel32: Use the Rtl UTF8 conversion functions.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-04 16:03:48 +01:00
Daniel Lehman
44b49f1a40
msvcrt: Set errno in _lseeki64.
...
Signed-off-by: Daniel Lehman <dlehman@esri.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-31 00:33:46 +01:00
Daniel Lehman
0357dfbc7e
msvcrt/tests: Fix _lseek arguments.
...
Signed-off-by: Daniel Lehman <dlehman@esri.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-29 23:30:47 +01:00
Michael Stefaniuc
3624b7c60c
msvcrt/tests: Use the available ARRAY_SIZE() macro.
...
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-06-21 14:20:57 +02:00
Piotr Caban
96584d858a
msvcrt: Don't report error in fclose on already closed stream.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-30 20:44:33 +01:00
Piotr Caban
1899eadf3e
msvcrt: Change how fread splits reading into chunks.
...
It affects fd stream position and buffer content on unsuccessul reads.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-30 20:44:33 +01:00
Piotr Caban
67926ec8c3
msvcrt: Set errno when close() is called on already closed fd.
...
Based on a patch by Olly Betts.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-28 20:39:29 +01:00
Piotr Caban
7aa4b6d170
msvcrt: Fix write() behaviour on "no console" file descriptors.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-15 10:50:22 +01:00
Piotr Caban
9b2397d5c8
msvcrt: Fix read() behaviour on "no console" file descriptors.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-15 10:50:20 +01:00
Piotr Caban
677301a29c
msvcrt: Fix close() behaviour on "no console" file descriptors.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-15 10:50:18 +01:00
Piotr Caban
31bf13e92b
msvcrt: Fix IO initialization when invalid handles are passed.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-15 10:50:10 +01:00
Alistair Leslie-Hughes
d379dc4cb0
msvcrt/tests: Use standard wine_dbgstr_longlong.
...
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-02 13:55:34 +02:00
Lauri Kenttä
cabf96512a
msvcrt/tests: Add tests for _creat.
...
Signed-off-by: Lauri Kenttä <lauri.kentta@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-07 22:05:31 +01:00
André Hentschel
a313c9b7f9
msvcrt/tests: Don't test function directly when reporting errno.
...
Signed-off-by: André Hentschel <nerv@dawncrow.de>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-05-05 01:27:52 +09:00
Nikolay Sivov
21fd1d3729
msvcrt: Fix calloc() prototype.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-26 14:48:47 +09:00
Piotr Caban
96d476584e
msvcrt/tests: Add close tests on file descriptors that use the same HANDLE.
...
Based on Qian Hong patch.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-20 12:09:22 +09:00
Iván Matellanes
ea2798f1ce
msvcrt: _setmode should check if file descriptor is valid.
2015-08-05 23:45:50 +09:00
Piotr Caban
86baccc9ae
msvcrt: Get rid of msvcrt_fdtoh helper.
2015-06-03 22:52:00 +09:00
Piotr Caban
7880525f44
msvcrt: Handle read buffer flushing in msvcrt_flush_buffer helper.
2015-01-26 11:22:54 +01:00
Piotr Caban
60eb44d820
msvcrt: Don't touch _bufsiz value while initializing FILE structure.
2014-06-27 10:37:54 +02:00
Piotr Caban
18a416f7d5
msvcrt: Support NULL buffer in setvbuf.
2014-06-26 19:00:41 +02:00
Grazvydas Ignotas
ad968be779
msvcrt: Implement bufsiz block flushing behavior.
2014-06-25 11:48:13 +02:00
Grazvydas Ignotas
c6a160691a
msvcrt: Clear _cnt on buffer flush.
2014-06-25 11:47:30 +02:00
Francois Gouget
eb4d39b9ee
msvcrt/tests: Add a trailing '\n' to an ok() call.
2014-06-18 19:56:07 +02:00
Grazvydas Ignotas
47909d8d8b
msvcrt/tests: Test _cnt value after rewind/fflush.
2014-06-18 19:54:43 +02:00
Alexandre Julliard
762c94144f
msvcrt/tests: Avoid size_t in traces.
2014-06-18 19:52:38 +02:00
Grazvydas Ignotas
40067dd011
msvcrt: Change internal buffer size to 4k.
2014-06-17 12:35:48 +02:00
Grazvydas Ignotas
147be95a68
msvcrt/tests: Add a test for fwrite flushing behavior.
2014-06-17 12:35:33 +02:00
Piotr Caban
6ad441cd6b
msvcrt: Return error on invalid handle in _open_osfhandle.
2014-02-12 19:15:28 +01:00
Piotr Caban
f4985e42b7
msvcrt/tests: Don't pass path containing spaces to _spawnvp.
2014-02-11 20:22:31 +01:00
Nikolay Sivov
1f8636c5af
msvcrt/tests: Enable compilation with -D__WINESRC__.
2013-11-05 20:38:55 +01:00
Piotr Caban
024ece50e8
msvcrt: Fix parameter validation in _stat64 function.
2013-08-26 15:01:37 +02:00
Piotr Caban
089cc78182
msvcrt: Fix lookahead buffer usage on pipes.
2013-08-21 19:52:51 +02:00
Piotr Caban
ce9d4b807e
msvcrt: Fix _mktemp implementation.
2013-07-24 14:35:11 -05:00
Akihiro Sagawa
cf2ce8c64b
msvcrt/tests: Add unicode fgetwc tests.
2013-03-27 20:12:28 +01:00
Akihiro Sagawa
c2ce2fa06e
msvcrt/tests: Add locale dependent fgetwc tests.
2013-03-27 20:12:28 +01:00
Piotr Caban
cd7b71d3f4
msvcrt: Added stdin close/open tests.
2013-03-04 11:14:47 +01:00
Piotr Caban
77f3ce0b10
msvcrt: Added fputwc tests.
2013-01-11 12:04:12 +01:00
Piotr Caban
777f349829
msvcrt: Added read tests on unicode files.
2013-01-10 12:29:33 +01:00
Piotr Caban
62bd615452
msvcrt: Added more read tests.
2013-01-10 12:29:02 +01:00
Piotr Caban
f93259b305
msvcrt: Added _setmode tests.
2013-01-10 12:28:57 +01:00
Piotr Caban
5778bdbc3a
msvcrt: Added write tests on unicode files.
2013-01-10 12:28:09 +01:00
Piotr Caban
617bf861ef
msvcrt: Added fopen_s test with ccs option.
2013-01-10 12:27:42 +01:00
Piotr Caban
bcf4467b86
msvcrt: Return error in stat function when path is specified with trailing slash character.
2012-12-27 17:15:39 +01:00
Robert van Herk
516bb0ba64
msvcrt: Fix file mode T (temporary file).
2012-03-28 11:47:13 +02:00