Commit Graph

351 Commits

Author SHA1 Message Date
Hugh McMaster 17023a8100 reg/tests: Comprehensively check for elevated privileges before starting Windows 3.1 import tests.
The existing check fails to adequately determine the program's elevation
status on systems where the test key already exists. This can cause all
Windows 3.1 import tests to fail on systems with a standard user account.

Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-02 17:56:28 +01:00
Hugh McMaster b369af9ac5 reg/tests: Fix copy/paste typo in reg.exe availability check.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-02 17:56:25 +01:00
Hugh McMaster 3c2db20f66 reg/tests: Rename reg.c to add.c.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-01 21:25:23 +01:00
Hugh McMaster cc4cc7086f reg/tests: Split 'copy' tests from reg.c.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-01 21:25:09 +01:00
Hugh McMaster 60701b0298 reg/tests: Split 'export' tests from reg.c.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-01 21:24:48 +01:00
Hugh McMaster fc5816a61e reg/tests: Split Windows 3.1 'import' tests from reg.c.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-01 21:24:46 +01:00
Hugh McMaster 56d9d0f791 reg/tests: Split whitespace 'import' tests from reg.c.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-01 21:24:44 +01:00
Hugh McMaster 2e33ab5559 reg/tests: Split first sequence of Unicode 'import' tests from reg.c.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-01 21:24:37 +01:00
Hugh McMaster 58863f5331 reg/tests: Split first sequence of 'import' tests from reg.c.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-01 21:24:37 +01:00
Hugh McMaster 81a8938fa3 reg/tests: Split 'query' tests from reg.c.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-01 21:24:23 +01:00
Hugh McMaster d3f9eaeb54 reg/tests: Split 'delete' tests from reg.c.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-01 21:24:08 +01:00
Hugh McMaster 3fd57fd995 reg/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-22 14:42:07 +01:00
Hugh McMaster 6c62ffeca7 reg/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-22 09:22:55 +01:00
Hugh McMaster 93fbe09ed0 reg/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-22 09:22:53 +01:00
Hugh McMaster 5cacd496a1 reg/tests: Verify registry export after each empty key test.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-22 09:22:51 +01:00
Hugh McMaster b51b969a01 reg/tests: Always overwrite export test file during 'export' sequence.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-22 09:22:49 +01:00
Hugh McMaster 597a12420b reg/tests: Check for key non-existence with verify_key_nonexist().
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-22 09:22:47 +01:00
Hugh McMaster e6e227f21d reg/tests: Move /v* syntax tests to the 'add' and 'delete' test sequences.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-22 09:22:45 +01:00
Hugh McMaster 405853adb5 reg/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-22 09:22:43 +01:00
Hugh McMaster add814af3e reg/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-22 09:22:40 +01:00
Hugh McMaster 6cf0e7fe85 reg/tests: Add initial syntax tests for 'reg copy'.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-09 21:17:05 +01:00
Alexandre Julliard f81d15beb6 reg: FormatMessage() now reports ERROR_NO_WORK_DONE error for empty string.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-13 22:07:31 +02:00
Alexandre Julliard ed6a5e97e0 programs: Make all program entrypoints cdecl.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-17 17:05:47 +02:00
Alexandre Julliard a58f4abc08 makefiles: Allow using EXTRADLLFLAGS instead of APPMODE.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-24 11:27:39 +02:00
Alexandre Julliard 1f38c1abf6 include: Add wcsicmp() inline wrapper.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-11 16:46:41 +02:00
Alexandre Julliard 9b63daca51 include: Default to the standards-compliant version of swprintf().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-11 16:46:41 +02:00
Alexandre Julliard 8268c47462 reg: Add missing null to terminate a string.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-03 21:47:59 +02:00
Alexandre Julliard 518a6c2d07 reg: Use C runtime wchar functions instead of wine/unicode.h.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-01 11:45:44 +02:00
Michael Stefaniuc cd8eb2445e reg: Remove redundant NULL check before heap_free().
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-29 21:40:02 +01:00
Michael Stefaniuc 962b31c80b include: Add a generic available ARRAY_SIZE().
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-07-04 10:39:15 +02:00
Hugh McMaster 0aead094a5 reg: 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:38 +02:00
Hugh McMaster 65717d6726 reg: 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 448344c5e4 reg/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:10 +02:00
Michael Stefaniuc 6542c3e860 reg: Use the global HeapAlloc() wrappers.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-08 09:42:12 +01:00
Alexandre Julliard 59c47c9e2c reg/tests: Get rid of version check.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-02 15:52:22 +01:00
Hugh McMaster a0a12d9f41 reg: Allow switches to be uppercase or lowercase.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-05 20:30:04 +01:00
Hugh McMaster 1818267639 reg/tests: Test capitalisation of switches.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-05 20:30:04 +01:00
Hugh McMaster 8534935492 reg: Define MAX_SUBKEY_LEN in reg.h.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-05 20:30:04 +01:00
Hugh McMaster ecb9ce4b2c reg: Make the newline string a static global.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-05 20:30:04 +01:00
Hugh McMaster 72db61da97 reg: Recursively export all subkeys and data.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-04 11:56:49 +01:00
Hugh McMaster 491801063f reg: Export REG_DWORD values.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-04 11:56:45 +01:00
Hugh McMaster b31f16885d reg: Export hex data types.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-04 11:56:40 +01:00
Hugh McMaster 2af9d75ba5 reg: Export REG_SZ data.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-04 11:56:32 +01:00
Hugh McMaster 879282ec14 reg: Export registry value names.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-04 11:56:27 +01:00
Hugh McMaster ab3ee817c3 reg: Export the name of the specified registry key.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-04 11:56:11 +01:00
Hugh McMaster fefae9ca78 reg: Export the registry file header.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-04 11:56:07 +01:00
Hugh McMaster 49f384727b reg: Prompt the user to overwrite the export file if it already exists.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-04 11:56:00 +01:00
Hugh McMaster 17494012a0 reg: Validate the registry key before commencing the export operation.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-04 11:55:04 +01:00
Hugh McMaster e0aadc0fc7 reg: Print a more informative error message if the system key is invalid.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-04 11:55:01 +01:00
Hugh McMaster 40643a43a4 reg: Validate the system key before commencing the export operation.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-04 11:54:11 +01:00