Commit Graph

158 Commits

Author SHA1 Message Date
Jacek Caban 3576258402 kernelbase: Use IOCTL_CONDRV_GET_INPUT_INFO in GetConsoleOutputCP.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-14 22:02:04 +02:00
Jacek Caban 4faed406d4 kernelbase: Use IOCTL_CONDRV_GET_INPUT_INFO in GetConsoleCP.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-14 22:02:04 +02:00
Jacek Caban 09ff2436c4 server: Pass console handle to the child process.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-13 21:12:50 +02:00
Jacek Caban 06c3e7e44c kernelbase: Close PEB ConsoleHandle in AttachConsole.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-13 21:12:32 +02:00
Jacek Caban 57a222356c kernel32: Set PEB console handle in AllocConsole.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-13 21:12:27 +02:00
Jacek Caban ccaaf6957f kernelbase: Close PEB ConsoleHandle in FreeConsole.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-13 21:12:22 +02:00
Jacek Caban cd8971399e kernel32/tests: Add console title tests.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-12 22:14:04 +02:00
Jacek Caban 5a6341d8c7 kernel32/tests: Add an option to test current console.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-12 22:14:02 +02:00
Jacek Caban 3d4be8e150 kernel32/tests: Disable ENABLE_VIRTUAL_TERMINAL_PROCESSING mode in testWriteNotWrappedProcessed.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-12 22:14:00 +02:00
Jacek Caban dc80851425 kernel32/tests: Fix ReadConsoleOutputW tests on Windows 8.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-12 22:13:58 +02:00
Jacek Caban a09a268fae kernel32/tests: Add more AllocConsole tests.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-30 21:41:47 +02:00
Jacek Caban 1e5cd8fadc kernel32/tests: Add more console output reading tests.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-28 19:31:56 +02:00
Jacek Caban 716bdfcbfa kernel32/tests: Add more console output tests.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-23 22:30:49 +02:00
Jacek Caban e613d81d81 kernelbase: Use NtCreateFile in CreateConsoleScreenBuffer.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-21 15:18:44 +02:00
Jacek Caban 48a23dbd43 kernelbase: Use IOCTL_CONDRV_GET_MODE in GetConsoleMode.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-13 21:22:13 +02:00
Jacek Caban eeb1f2b0f0 kernel32/tests: Add more invalid handle tests.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-09 19:41:50 +02:00
Jacek Caban e43f51640a kernel32: Return standard input handle in GetConsoleInputWaitHandle.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-01 20:33:07 +02:00
Jacek Caban 0556d9e6f1 kernelbase: Use NtCreateFile for console handles in CreateFileW.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-26 21:52:21 +02:00
Jacek Caban 9bdfb1a29a kernel32/tests: Add more tests for opening console.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-26 21:50:56 +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
Aaro Altonen b21881f53c kernelbase: Implement SetConsoleScreenBufferInfoEx().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47288
Signed-off-by: Aaro Altonen <a.altonen@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-05 19:58:42 +01:00
Aaro Altonen 723506ef48 kernel32/tests: Add tests for SetConsoleScreenBufferInfoEx().
Signed-off-by: Aaro Altonen <a.altonen@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-05 19:57:56 +01:00
Gijs Vermeulen a507126ac4 kernel32/tests: Add GetCurrentConsoleFontEx tests.
Signed-off-by: Gijs Vermeulen <gijsvrm@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-25 20:47:43 +01:00
Francois Gouget da238dc1d1 kernel32: Match the Windows 10 1709+ SetConsoleFont() implementation.
That is return the same 'E_NOTIMPL' error code.
Remove the todo_wine-s but keep the tests in case we want to implement
the API for compatibility with old Windows versions.

Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-14 09:40:36 +01:00
Francois Gouget ba4cfbd448 kernel32/tests: Windows 10 dropped support for SetConsoleFont().
Windows 10 1507 still supports it but not 1607+.

Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-14 09:40:33 +01:00
Francois Gouget 31046449e6 kernel32: Match the Windows 10 1709+ GetConsoleFontInfo().
That is return the same 'E_NOTIMPL' error code.
Remove the todo_wine-s but keep the tests in case we want to implement
the API for compatibility with older Windows versions.

Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-08 18:19:17 +01:00
Francois Gouget 2f30f28b04 kernel32/tests: Windows 10 dropped support for GetConsoleFontInfo().
Windows 10 1507 still supports it but not 1607+.

Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-08 18:19:17 +01:00
Gijs Vermeulen b03a4b8902 kernel32/tests: Fix some console tests on newer Win10.
Signed-off-by: Gijs Vermeulen <gijsvrm@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-30 22:24:27 +02:00
Jacek Caban 57212f64f8 kernel32: Add AttachConsole implementation.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=41573
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=43910
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-16 13:21:56 +02:00
Michael Stefaniuc 80be3a460b kernel32/tests: Use the available ARRAY_SIZE() macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-06-27 22:02:48 +02:00
Alex Henrie f962bb0039 kernel32/tests: Detect and handle a redirected stdin.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-06 21:31:07 +01:00
Huw Davies 5dd0c7fa7b kernel32/tests: VerifyConsoleIoHandle() always returns FALSE on Windows 8 and 10.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-11-22 13:54:50 +01:00
Huw Davies 542ba85ef8 kernel32/tests: On failure don't test the returned count - it contains random data on Windows 8 and 10.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-11-22 13:54:46 +01:00
Huw Davies f1b5e98ad8 kernel32/tests: Add some GetLastError() values for Windows 8 and 10.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-11-22 13:54:40 +01:00
André Hentschel 6231d475a1 kernel32/tests: Don't test CloseHandle.
Signed-off-by: André Hentschel <nerv@dawncrow.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-12 11:11:11 +09:00
Keno Fischer ccc1d346a6 kernel32: Fix RegisterWaitForSingleObject for console handles.
Signed-off-by: Keno Fischer <keno@juliacomputing.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-19 16:14:30 +09:00
Hugh McMaster 2bda84a410 kernel32: Implement GetConsoleScreenBufferInfoEx.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-17 13:40:37 +09:00
Hugh McMaster 95f8270bc2 kernel32/tests: Add tests for GetConsoleScreenBufferInfoEx.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-17 13:40:34 +09:00
Hugh McMaster 9c01d10bc6 kernel32/tests: Add tests for SetConsoleFont.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-05-04 01:03:27 +09:00
Hugh McMaster 46cc1388cf kernel32/tests: Add more tests for GetConsoleFontInfo.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-05-04 01:03:27 +09:00
Hugh McMaster de13e818ce kernel32/tests: Add initial tests for GetConsoleFontInfo.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-26 23:00:20 +09:00
Hugh McMaster c6e10496b3 kernel32/tests: Add tests for the TRUE pathway of GetCurrentConsoleFont.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-28 01:22:41 +09:00
Sebastian Lackner dfe42ca506 kernel32: Clamp maximum console window size to screen buffer size.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-06 18:08:31 +01:00
Hugh McMaster c3ea629f3c kernel32/tests: Add tests for GetLargestConsoleWindowSize.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-05 17:08:02 +01:00
Hugh McMaster b36cc985a4 kernel32/tests: Refresh the console to clear the console font table.
The testScreenBuffer function unintentionally causes the console font
table to increase from 14 entries to about 40.

Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-05 17:07:45 +01:00
Hugh McMaster 77a75d74a2 kernel32/tests: Add tests for GetConsoleFontSize.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-11-03 00:33:25 +09:00
Hugh McMaster 0ad7a0df89 kernel32/tests: Add tests for the FALSE pathway of GetCurrentConsoleFont.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-10-26 23:03:35 +09:00
Dmitry Timoshkov e03a3fe509 kernel32: Add a workaround for broken apps that pass negative values to ReadConsole. 2014-04-16 10:54:15 +02:00
Dmitry Timoshkov c3ee3da58a kernel32: Filter out console handles in GetFileSize. 2014-04-14 10:30:30 +02:00
André Hentschel 1c61a53ef6 kernel32/tests: Don't test last error on success. 2014-01-08 11:10:27 +01:00
André Hentschel 29907a2862 kernel32/tests: Add missing last errors for win8. 2014-01-07 10:42:32 +01:00
André Hentschel 6db63a1867 kernel32/tests: Allow more last errors from win8. 2014-01-06 17:16:33 +01:00
André Hentschel a803c496b2 kernel32/tests: Accept more win8 return values. 2013-12-26 13:44:34 +01:00
André Hentschel 5a6d38c2bd kernel32: Adapt input checking in OpenConsoleW to match win8 behaviour. 2013-12-26 13:42:55 +01:00
Francois Gouget 7425d2cac2 kernel32/tests: Remove a couple of incorrect CreateFile() console tests. 2013-11-01 10:57:14 +01:00
Francois Gouget 18a9aba058 kernel32/tests: Windows 8 returns different error codes. 2013-11-01 10:54:12 +01:00
Dmitry Timoshkov fd65dfbac9 kernel32/tests: Fix console tests compilation with __WINESRC__ defined. 2013-10-21 20:23:54 +02:00
Francois Gouget d3672524ed Assorted spelling fixes. 2013-10-01 19:09:08 +02:00
Michael Stefaniuc 2a39cb377a dlls: Replace the remaining CONSTs. 2013-09-25 11:49:20 +02:00
Francois Gouget c2a5b04d01 kernel32/tests: Reduce the size of the console buffer to speed up the tests. 2013-02-11 17:52:43 +01:00
André Hentschel 27b0b93684 kernel32/tests: Fix crashes on win8 in console. 2012-11-30 19:12:17 +01:00
Francois Gouget fac36c55e9 Assorted typo, spelling, wording and case fixes. 2012-05-15 16:26:43 +02:00
Akihiro Sagawa e4692b3f66 kernel32/tests: Add more tests for WriteConsole. 2012-03-09 11:27:30 +01:00
Eric Pouech d967484ecc kernel32: Added a couple of tests about console creation through CreateFile, and fix some corner cases. 2012-02-08 10:47:57 -06:00
Thomas Faber fc2dcd04ab kernel32/tests: Fix MSVC build in console.c. 2011-10-04 17:31:45 -05:00
Eric Pouech 8a529d60e2 kernel32: In CreateFile, when trying to open the CON special DOS file, force OPEN_EXISTING as creation flag. 2011-05-11 14:56:48 +02:00
Eric Pouech fa8d5d166c kernel32: Added some tests about CON special file treatment in CreateFile. 2011-05-11 14:56:48 +02:00
Andrew Nguyen df18e3fdd4 kernel32/tests: Demonstrate an input event handling peculiarity with WriteConsoleInputA. 2011-01-11 16:05:47 +01:00
Andrew Nguyen e2e9141918 kernel32/tests: Demonstrate an input event handling peculiarity with WriteConsoleInputW. 2011-01-11 16:05:47 +01:00
Andrew Nguyen b158d23c88 kernel32: Improve parameter validation for ReadConsoleOutputAttribute. 2011-01-11 16:05:47 +01:00
Andrew Nguyen 66b42c86d1 kernel32: Improve parameter validation for ReadConsoleOutputCharacterA. 2011-01-11 16:05:47 +01:00
Andrew Nguyen c905b7e705 kernel32: Improve parameter validation for ReadConsoleOutputCharacterW. 2011-01-11 16:05:47 +01:00
Greg Geldorp 6b8812add1 kernel32/tests: Set TrueType console font before running tests.
ReadConsoleOutputW doesn't retrieve characters from the output buffer
correctly for characters that don't have a glyph in the console font.
2011-01-10 15:02:24 +01:00
Andrew Nguyen 51d05e241a kernel32: Improve parameter validation for FillConsoleOutputAttribute. 2011-01-04 11:58:34 +01:00
Andrew Nguyen 50ee017f34 kernel32/tests: Add tests for FillConsoleOutputCharacterA. 2011-01-04 11:58:34 +01:00
Andrew Nguyen 5a7c633fab kernel32: Improve parameter validation for FillConsoleOutputCharacterW. 2011-01-04 11:58:33 +01:00
Andrew Nguyen 8ec12b5110 kernel32: Improve parameter validation for WriteConsoleOutputAttribute. 2011-01-04 11:58:33 +01:00
Andrew Nguyen 5f70cd6509 kernel32: Improve parameter validation for WriteConsoleOutputCharacterA. 2011-01-04 11:58:33 +01:00
Andrew Nguyen 2281c29b46 kernel32: Improve parameter validation for WriteConsoleOutputCharacterW. 2011-01-04 11:58:33 +01:00
Andrew Nguyen 9febdf3f58 kernel32: Improve parameter validation for WriteConsoleInputA. 2011-01-04 11:58:32 +01:00
Andrew Nguyen 0272da5afa kernel32: Improve parameter validation for WriteConsoleInputW. 2011-01-04 11:58:13 +01:00
Andrew Nguyen 3501b0a580 kernel32: Fail with an invalid output parameter in GetNumberOfConsoleInputEvents. 2011-01-04 11:51:03 +01:00
Andrew Nguyen ab8b2cfaa1 kernel32/tests: Avoid an input buffer overrun in the empty console write test. 2011-01-03 14:58:55 +01:00
Alexandre Julliard 5db7d5957a kernel32/tests: Use a real console handle in the VerifyConsoleIoHandle test. 2010-09-29 11:57:42 +02:00
Peter Oberndorfer 9d74a70ad5 kernel32: Fix last error value of GetStdHandle/SetStdHandle when called with wrong std handle. 2010-09-23 12:00:44 +02:00
Peter Oberndorfer 297b054e74 kernel32: VerifyConsoleIoHandle does not set last error value. 2010-09-23 12:00:29 +02:00
Andrew Nguyen 39208d4d60 kernel32: Don't set last error on success in OpenConsoleW. 2010-04-01 18:12:40 +02:00
Andrew Nguyen b7bf2abdff kernel32: Improve parameter validation in OpenConsoleW. 2010-04-01 18:12:40 +02:00
Paul Vriens a95e070824 kernel32: Add a stubbed GetConsoleProcessList(). 2010-01-05 12:29:18 +01:00
Paul Vriens d11df5126d kernel32/tests: Fix some test failures on Win9x/WinMe. 2009-10-14 14:24:29 +02:00
Ge van Geldorp 40d8c87df2 kernel32/tests: Remove test that crashes on Win7. 2009-08-26 16:33:38 +02:00
Paul Vriens 54845cd40a kernel32/tests: Correct an ok() statement. 2009-03-04 14:42:30 +01:00
Francois Gouget 41360cc161 kernel32/tests: Change to a win_skip() because we don't want to skip the GetConsoleCursorInfo(,NULL) test in Wine. 2009-02-24 16:57:26 +01:00
Francois Gouget 5989534540 kernel32/tests: Use win_skip() to skip over unimplemented functionality. 2009-02-24 16:57:26 +01:00
Andrew Nguyen 976d5cae8d kernel32: Ensure that WriteConsoleW succeeds with an empty input buffer. 2009-01-19 13:36:25 +01:00
Andrew Nguyen 1571c05ad5 kernel32/tests: Simplify a test function's parameters. 2009-01-19 13:36:25 +01:00
Paul Vriens dd01d39f3b kernel32: Fix return values of GetConsoleCursorInfo. 2008-06-24 12:47:18 +02:00
Paul Vriens 296bbde1c1 kernel32/tests: Add some tests for GetConsoleCursorInfo. 2008-06-24 12:45:25 +02:00
Paul Vriens 1cfad7f07f kernel32/tests: Skip some tests on win98. 2008-05-02 16:18:02 +02:00
Paul Vriens 0a4eebd744 kernel32/tests: Don't run tests on win9x if we are out of memory. 2008-05-02 12:55:12 +02:00