Commit Graph

722 Commits

Author SHA1 Message Date
Piotr Caban 4a4621f42f msvcrt/tests: Use wide-char string literals.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-27 21:59:39 +01:00
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
Alexandre Julliard 86b0a633c6 msvcrt/tests: Remove the headers test.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-20 12:36:16 +01:00
Chip Davis 5d07f809a0 ucrtbase: Sync __lc_time_data definitions.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-18 22:27:51 +01:00
Alexandre Julliard 1f27361894 msvcrt: Avoid long double type in $I10_OUTPUT().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-17 13:46:26 +01:00
Will Mainio e0812be876 msvcrt/tests: Add scanf tests for dashes in scanset.
Signed-off-by: Will Mainio <will.mainio@fastmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-02 22:06:52 +01:00
Paul Gofman ebe3fe536c msvcrt: Implement _mbbtype_l().
Fixes Midnight Castle Succubus.

Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-24 17:44:51 +02:00
Paul Gofman 12106c214b msvcrt: Implement _mbscmp_l().
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-24 17:44:47 +02:00
Paul Gofman 082de781f0 msvcrt: Implement _mbsnextc_l().
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-24 17:44:44 +02:00
Paul Gofman e6a42874a2 msvcrt/tests: Test .{O|A}CP locale string.
Used by Marvel's Avengers.

Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-18 22:07:50 +02:00
Piotr Caban 8b7eedc180 msvcrt: Fix _vs{w,n}printf_c function when terminating character doesn't fit into buffer.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-15 21:43:45 +02:00
Daniel Lehman 5458eea5b3 msvcrt/tests: Add tests for SpecialCasing.
Signed-off-by: Daniel Lehman <dlehman25@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-18 21:36:14 +02:00
Piotr Caban 5983fcfec9 msvcrt: Return error on invalid character in mbstowcs.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-05 15:20:33 +02:00
Zebediah Figura 3f5066b12e msvcrt/tests: Fix some tests on Windows 2003 and earlier.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-03 10:22:50 +02:00
Piotr Caban 4fe481db95 msvcrt: Add __STRINGTOLD tests.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-23 22:30:49 +02:00
Daniel Lehman ee65859b7f msvcrt: Treat large exponent as overflow in strtod.
Signed-off-by: Daniel Lehman <dlehman25@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-17 00:04:13 +02:00
Daniel Lehman 0945ba00fb msvcrt: Set errno in strtod.
Signed-off-by: Daniel Lehman <dlehman25@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-17 00:04:13 +02:00
Daniel Lehman 3f8b0891e7 msvcrt/tests: Check errno in strtod test.
Signed-off-by: Daniel Lehman <dlehman25@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-17 00:04:13 +02:00
Piotr Caban 841fbd5b14 msvcrt: Don't use strcmpW in wcscmp.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-14 22:31:55 +02:00
Piotr Caban 1bc6f0c861 msvcrt: Reimplement floating point numbers printing.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=37913
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-13 21:22:11 +02: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
Piotr Caban ab5e48f4fc msvcrt: Fix 0 parsing in parse_double helper.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-04 12:39:09 +02:00
Piotr Caban 19bff79da8 msvcrt/tests: Cleanup strtod tests.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-04 12:39:09 +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
Alexandre Julliard bf48e86add msvcrt/tests: Add tests for Unicode spaces in wcstol().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-11 09:29:56 +01:00
Jacek Caban b3d13197e3 msvcrt/tests: Use __[w]getmainargs declarations from headers.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-04 20:10:09 +01:00
Jacek Caban c15733dead include: Add corecrt_startup.h header.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-27 23:37:56 +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
Rémi Bernon ab3ca36baf msvcrt/tests: Fix some format-overflow warnings.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-12 16:54:03 +01:00
Daniel Lehman e9737e1738 msvcrt: Set return value on all paths in wcstombs_s_l.
Signed-off-by: Daniel Lehman <dlehman@esri.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-05 21:29:14 +01:00
Daniel Lehman 4178972487 msvcrt: Don't set error in wcstombs_s_l if no characters to convert.
Signed-off-by: Daniel Lehman <dlehman@esri.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-05 21:29:04 +01:00
Daniel Lehman 05e335c103 msvcrt/tests: Add some wcstombs_s_l tests.
Signed-off-by: Daniel Lehman <dlehman@esri.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-04 21:30:26 +01:00
Jacek Caban 3dcedeef2d msvcrt/tests: Avoid using msvcrt.h header.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-29 20:39:17 +01:00
Chip Davis 0216290675 msvcrt: Fix the btowc() function.
This function returns WEOF on conversion failure. It should only operate
on single-byte characters in the C locale. Finally, it should use the
current locale's codepage, instead of the current locale itself, to do
conversions.

Signed-off-by: Chip Davis <cdavis@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-29 20:31:43 +01:00
Piotr Caban 1d0cca465a msvcrt: Add support for quoted paths in _searchenv.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-28 19:29:48 +01:00
Zhiyi Zhang 84f2ce5139 msvcrt/tests: Fix some test failures.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-22 21:30:19 +01:00
Alexandre Julliard 4e2da207d7 msvcrt: Use unsigned comparisons in strcmp and strncmp.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48454
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-16 12:21:11 +01:00
Piotr Caban 287dabd9b6 msvcrt: Fix floating point numbers scanning when null-byte is preceding the number.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48452
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-13 22:20:36 +01:00
Piotr Caban 9b6c9b0881 msvcrt/tests: Improve doubles comparison in strtod and atodbl tests.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-26 21:56:04 +01:00
Erich E. Hoover 27b9a420ea msvcrt: Fix [str|wcs]tod result being compared against FLT_MAX.
Also a more straightforward way of fixing the tests on i386 Linux.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48324
Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-23 20:13:23 +01:00
Erich E. Hoover c22af971c2 msvcrt: Implement strtod without using 'long double'.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48160
Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-19 16:20:39 +01:00
Alexandre Julliard 7638682433 msvcrt: Fix wcstoul() to behave identically to strtoul().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48261
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-17 16:55:15 +01:00
Alexandre Julliard d1444cb12a msvcrt/tests: Add some tests for wcstoi64().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-17 16:55:15 +01:00
Francois Gouget 92d31164aa msvcrt/tests: Avoid an unneeded strlen() call.
Note that buf is an array and thus cannot be NULL.

Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-10 20:59:19 +01:00
Piotr Caban 7695433c05 msvcrt: Support mixing length and width in scanf format.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45967
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-06 22:30:23 +01:00
Gijs Vermeulen e44d935cc6 msvcrt: Optimize _strlwr implementation in C locale.
Tests by Ambrož Bizjak.

Signed-off-by: Gijs Vermeulen <gijsvrm@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-04 16:44:06 +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
Alexandre Julliard 65049191ab msvcrt/tests: Avoid winetest_strcmpW.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-29 13:57:46 +01:00
Jeff Smith 6f13ac30b9 msvcrt: Correct behavior of time in strftime formats %X %c.
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-21 19:01:10 +01:00