Commit Graph

137 Commits

Author SHA1 Message Date
Eric Pouech acdbe6c296 regedit/tests: Enable compilation with long types.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-03 17:19:41 +01:00
Alexandre Julliard f0cd33c69e include: Add support for defining Win32 types as 'long' where possible.
Add -DWINE_NO_LONG_TYPES to modules that still have compilation
warnings with long types.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-27 20:38:22 +01:00
Hugh McMaster b8b7979f9c regedit: Stop parsing REG_SZ values containing NUL character sequences.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-12 12:49:39 +01:00
Hugh McMaster 7eb77bef05 regedit/tests: Add tests for escaped null characters.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-11 13:13:35 +01:00
Hugh McMaster d1fbb6b999 regedit/tests: Remove elevated user checks from the Windows 3.1 test sequences.
The tests only run if regedit.exe is started with elevated privileges.
This is determined when the test suite is invoked.

Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-25 08:57:02 +01:00
Hugh McMaster bedd54c968 regedit/tests: Comprehensively check for elevated privileges before starting tests.
Calls to regedit.exe on user accounts with standard privileges trigger a UAC
prompt. Not responding to the prompt eventually causes a test timeout, so
use registry API calls to determine if the tests are running with elevated
privileges.

Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-25 08:56:59 +01:00
Hugh McMaster ee579a0f1d regedit/tests: Add tests for forward and back slashes in key and value names.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-23 10:03:58 +01:00
Hugh McMaster 704bd45da5 regedit/tests: Add additional tests with embedded NUL characters.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-23 10:03:56 +01:00
Hugh McMaster 294be8b7a2 regedit/tests: Use delete_key() and delete_tree() where possible.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-23 10:03:53 +01:00
Hugh McMaster a3b1743ced regedit/tests: Replace RegCloseKey() with the helper function close_key().
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-23 10:03:49 +01:00
Hugh McMaster c86e62442f regedit/tests: Ensure test key is fully removed before each sequence begins.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-23 10:03:42 +01:00
Hugh McMaster 8a43d29ef4 regedit/tests: Check for elevated privileges before cleaning up the Windows 3.1 test key and running unit tests.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-23 10:03:34 +01:00
Hugh McMaster 62027322b0 regedit: Stop exporting REG_SZ data at the first NUL character.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-05-08 10:41:35 +02:00
Hugh McMaster 829c0ced69 regedit: Null terminate hex-formatted REG_SZ data if necessary.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-04-24 00:25:15 +02:00
Hugh McMaster 7cd90766bb regedit/tests: Add tests for values with embedded null characters.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-04-19 17:38:09 +02:00
Alexandre Julliard 6c5deaa474 regedit/tests: Get rid of version check.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-02 15:52:22 +01:00
Zebediah Figura 0875bf8974 regedit/tests: Skip tests if running as non-elevated admin.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-22 16:59:27 +01:00
Hugh McMaster 8a8a2c9bb9 regedit: Correctly export REG_DWORD values with no data.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-10 13:46:31 +01:00
Hugh McMaster 84dda23536 regedit: Correctly import hex values with no data.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-10-16 15:26:33 +02:00
Hugh McMaster 33f9093f6d regedit/tests: Add more export tests.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-10-13 12:57:34 +02:00
Hugh McMaster 8ecc0d41ca regedit/tests: Add REG_NONE to the empty hex data import tests.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-10-13 12:57:30 +02:00
Hugh McMaster a5de10a207 regedit/tests: Delete the export file before returning from compare_export().
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-10-13 12:57:27 +02:00
Hugh McMaster 1baa026bc3 regedit/tests: Use a helper function to open registry keys.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-10-13 12:57:25 +02:00
Hugh McMaster c751b69f88 regedit/tests: Print an error code when CreateFile fails.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-10-13 12:57:22 +02:00
Hugh McMaster 1e6bf7d996 regedit/tests: Add REG_BINARY to the empty hex data import tests.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-10-09 19:50:40 +02:00
Hugh McMaster 52f686e054 regedit/tests: Test the importing of hex values with no data.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-10-05 19:33:09 +02:00
Hugh McMaster 326fa95eab regedit/tests: Use a helper function to delete registry values.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-25 22:21:42 +02:00
Hugh McMaster 03a9bf4f5c regedit/tests: Test registry export against order of data creation.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-25 22:21:42 +02:00
Hugh McMaster 73bb1f66a3 regedit/tests: Test registry export with a complex data structure.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-25 22:21:42 +02:00
Hugh McMaster b3032b425e regedit/tests: Test registry export with a simple data structure.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-25 22:21:42 +02:00
Hugh McMaster fd4ce9a0ef regedit/tests: Test registry export with an empty key.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-25 22:21:42 +02:00
Hugh McMaster cca0147fcf regedit/tests: Use a helper function to delete registry keys.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-25 22:21:42 +02:00
Hugh McMaster ee11f6fff5 regedit/tests: Combine and rename the r_exec_import_*str functions.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-18 15:22:58 +02:00
Hugh McMaster 7744204962 regedit/tests: Use a helper function to write registry files.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-18 15:22:53 +02:00
Hugh McMaster e9daef47e1 regedit: Null-terminate incomplete REG_EXPAND_SZ and REG_MULTI_SZ Unicode data.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-28 14:57:10 +02:00
Hugh McMaster 60e771e686 regedit: Close any open registry keys before starting the key deletion process.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-25 08:07:57 +02:00
Hugh McMaster 484f88080d regedit/tests: Add some mixed key creation and deletion tests.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-25 08:07:50 +02:00
Hugh McMaster d78767b63c regedit/tests: Add Unicode tests for importing invalid registry data.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-24 16:59:59 +02:00
Hugh McMaster cbe95347fc regedit/tests: Add Unicode tests for value deletion.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-24 16:59:57 +02:00
Hugh McMaster 0eab4519c0 regedit/tests: Add Unicode tests for registry key creation and deletion.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-24 16:59:55 +02:00
Hugh McMaster 634156b10a regedit/tests: Add Unicode tests for importing registry data with whitespace.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-24 16:59:53 +02:00
Hugh McMaster 13cbc36690 regedit/tests: Add Unicode tests for importing registry data with inter-mixed comments.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-24 16:59:51 +02:00
Hugh McMaster b46b698e82 regedit/tests: Delete the test registry key before starting each test.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-24 16:59:49 +02:00
Hugh McMaster d8cdafcc6f regedit/tests: Add Unicode import tests and remove the WCHAR support check.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-24 08:42:21 +09:00
Hugh McMaster 7f11a24fee regedit: Null-terminate REG_EXPAND_SZ and REG_MULTI_SZ hex data during concatenation if we reach EOF.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-10 20:51:11 +02:00
Hugh McMaster 6f24426692 regedit/tests: Test the effects of EOF on hex data during concatenation.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-07 19:48:32 +02:00
Hugh McMaster 3908296237 regedit: Null-terminate REG_EXPAND_SZ and REG_MULTI_SZ data if the parsed hex data does not end in a null-terminating character.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-06 18:50:48 +02:00
Hugh McMaster 7b95ddcb04 regedit: Hex data lines may be terminated by a semicolon.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-06 18:50:48 +02:00
Hugh McMaster 23c93d3026 regedit/tests: Add some more tests for importing hex data.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-06 18:50:48 +02:00
Hugh McMaster 3afa0e42c8 regedit/tests: Add another test for "0x" prefixes in the hex data type.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-06 18:50:47 +02:00