Commit Graph

322 Commits

Author SHA1 Message Date
Hugh McMaster 16b1ab0e92 reg/tests: Test case sensitivity when creating and deleting registry keys.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-13 20:56:19 +02:00
Hugh McMaster 8834968d02 reg/tests: Remove un-needed tab characters from some keys in the key deletion tests.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-09 09:18:51 +02:00
Hugh McMaster 80d248c5f9 reg/tests: Add tests for deleting registry values during the import operation.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-08 16:44:57 +02:00
Hugh McMaster c36eeee605 reg/tests: Add tests for key creation and deletion.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-08 16:44:57 +02:00
Hugh McMaster 2b27a98bd0 reg/tests: Remove two un-needed concatenation backslashes and fix some copy/paste errors.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-19 17:44:18 +02:00
Hugh McMaster 56c0b38dfa reg/tests: Add tests for importing REG_BINARY data.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-18 14:34:07 +02:00
Hugh McMaster 9cd75938b4 reg/tests: Add tests for importing REG_EXPAND_SZ data.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-18 14:34:05 +02:00
Hugh McMaster 8ef6091c8c reg/tests: Add tests for importing REG_NONE data.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-18 14:34:04 +02:00
Hugh McMaster 0760cd012c reg/tests: Test whether blank lines affect multi-line concatenation.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-18 14:34:02 +02:00
Hugh McMaster 051cb39d61 reg/tests: Test if REG_SZ and REG_DWORD support line concatenation.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-18 14:34:00 +02:00
Hugh McMaster c5f0de7748 reg/tests: Add tests for key name and value name concatenation.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-18 14:33:58 +02:00
Hugh McMaster f0f0a8c022 reg/tests: Add some more import tests.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-24 20:30:16 +02:00
Hugh McMaster 66fd733990 reg/tests: Add some missing REG_SZ import tests from regedit.exe.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-12 19:04:06 +02:00
Hugh McMaster ee4775a7a2 reg/tests: Add more REG_SZ import tests.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-12 19:04:04 +02:00
Hugh McMaster 4bee2b4f41 reg/tests: Add a few more import tests.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-11 15:52:51 +02:00
Hugh McMaster 47f506a1e1 reg/tests: Add tests for importing DWORD values.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-10 21:51:40 +02:00
Hugh McMaster 19d8fcc42e reg/tests: Add import tests with various combinations of spaces and tabs.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-03 14:09:52 +02:00
Hugh McMaster ddb1c93742 reg/tests: Add mixed line concatenation and comment tests.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-24 12:45:14 +01:00
Hugh McMaster 58f289b58f reg/tests: Add some line concatenation tests.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-03 20:43:39 +01:00
Hugh McMaster c3a46653e1 reg/tests: Test import with non-standard registry file headers.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-24 13:54:17 +01:00
Hugh McMaster da5a0b7611 reg/tests: Add tests for quotes and slashes in keys, values and data.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-01-05 14:54:59 +01:00
Hugh McMaster d4be360b01 reg/tests: Add tests for line concatenation when importing.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-12-20 13:02:29 +01:00
Hugh McMaster a4d892e244 reg/tests: Fix copy/paste errors in some tests.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-12-07 14:45:17 +01:00
Hugh McMaster 896c5205d9 reg/tests: Add Unicode tests for comment parsing.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-12-07 14:45:17 +01:00
Hugh McMaster 0a827326b0 reg/tests: Add tests for parsing comments.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-12-07 14:45:16 +01:00
Hugh McMaster be3a4c2613 reg/tests: Add verify_reg_nonexist helper function.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-12-07 14:45:16 +01:00
Hugh McMaster f4334f29f8 reg/tests: Test whether comment lines ending in a backslash affect the next line.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-12-02 15:54:07 +01:00
Hugh McMaster 80b884fbef reg/tests: Fix line concatenation tests.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-12-02 15:54:05 +01:00
Hugh McMaster a2fc092e08 reg/tests: Add more tests for 'reg import'.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-11-23 22:36:40 +01:00
Hugh McMaster bce972b156 reg/tests: Add line break and complexity tests for 'reg import'.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-24 14:04:18 +02:00
Hugh McMaster 6d72a0cca3 reg/tests: Exclude the null terminating character from MultiByteToWideChar conversion.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-03 00:42:16 +09:00
Hugh McMaster 0cea0605cf reg/tests: Fix copy/paste error in 'import' tests.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-30 21:54:24 +09:00
Hugh McMaster ae7398e3a4 reg/tests: Remove embedded BOM tests and add other tests for 'reg import'.
BOM may only appear at the start of the data stream. Use of an
embedded BOM was deprecated in Unicode 3.2.

Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-29 12:03:16 +09:00
Hugh McMaster 68c1765a5d reg: Simplify help handling by removing an if-else if-else block.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-19 13:37:57 +09:00
Hugh McMaster 8a8a753cfa reg: Fix dword conversion on 64-bit operating systems.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-19 13:12:15 +09:00
Hugh McMaster 5df297206d reg/tests: Add more Unicode tests for 'reg import'.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-15 22:46:37 +09:00
Hugh McMaster 596ca595d8 reg/tests: Add more tests for 'reg import'.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-15 22:46:26 +09:00
Alexandre Julliard ce7c4b58b2 reg/tests: Avoid non-portable Unicode chars.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-12 12:45:16 +09:00
Hugh McMaster e4da2c59cf reg/tests: Add more tests for 'reg import'.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-08 18:41:31 +09:00
Hugh McMaster 78fecb0397 reg/tests: Add some tests for 'reg import'.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-27 23:55:42 +09:00
Hugh McMaster 73f60910e4 reg: Handle a special case for Default values and 'reg query'.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-21 23:36:05 +09:00
Hugh McMaster 2885170057 reg: Free szValue after deleting all registry values (Coverity).
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-05 23:22:05 +09:00
Hugh McMaster ecdd3c8e84 reg: Always output the long key name when printing strings.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-15 17:11:53 +09:00
Hugh McMaster 4a22ba5b46 reg: Parse the registry key using a helper function.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-15 17:11:53 +09:00
Hugh McMaster 7d962327b1 reg: Avoid possible out-of-bounds memory access when a switch is only a forward slash or hyphen.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-09 18:26:43 +09:00
Hugh McMaster f426ece3a1 reg: Recognise switches beginning with a forward slash or hyphen.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-08 23:35:18 +09:00
Hugh McMaster 57c39cf2b6 reg/tests: Add tests for invalid switches.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-08 23:34:38 +09:00
Hugh McMaster 31efcc634a reg: Do not allow duplicate /d or /t switches.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-08 23:34:34 +09:00
Hugh McMaster 1148e9e050 reg/tests: Add initial tests for 'reg import'.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-06 19:51:45 +09:00
Hugh McMaster 17d606a3b9 reg: Move duplicate /v, /ve and /va combination checks to wmain.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-06 19:51:45 +09:00
Hugh McMaster 0f7bdf7d57 reg: Remove an unreachable 'else' pathway from wmain.
Invalid operations are handled earlier in wmain.

Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-06 19:51:44 +09:00
Hugh McMaster 7484c5eba3 reg: Combine duplicate 'for' loops in wmain and parse all remaining arguments.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-06 19:51:44 +09:00
Hugh McMaster f1bf0bfbc3 reg: Move duplicate strchrW() calls to wmain.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-06 19:51:44 +09:00
Hugh McMaster c0d9908558 reg: Rename HKEY 'subkey' to 'key' in reg_add() and reg_delete().
This better reflects the purpose of the HKEY.

Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-06 19:51:44 +09:00
Hugh McMaster ee71883964 reg: Move duplicate path_get_rootkey() calls to wmain.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-03 22:48:39 +09:00
Hugh McMaster d57ad7b054 reg: Move duplicate sane_path() calls to wmain.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-03 22:48:37 +09:00
Hugh McMaster 2864105ef5 reg: Make help for registry operations common in wmain.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-03 22:48:35 +09:00
Hugh McMaster 45acfd9b50 reg: Simplify help logic and syntax.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-03 22:48:33 +09:00
Hugh McMaster 33d657f55c reg: Exit with an error if the specified operation is invalid.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-03 22:48:31 +09:00
Hugh McMaster 6a927ef70c reg: Parse the registry operation using an enum.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-03 22:48:29 +09:00
Hugh McMaster 6ce8524271 reg: Recognise hyphen and forward slash help switches.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-03 22:48:27 +09:00
Hugh McMaster deaad0f90a reg: Inform users about the 'add/delete/query /?' command.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-05-24 22:32:04 +09:00
Hugh McMaster 859ff854a1 reg: Update the general usage message.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-05-24 22:30:42 +09:00
Hugh McMaster 2b77d24f0f reg: Update general help logic.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-05-24 22:28:49 +09:00
Hugh McMaster ccbbb92888 reg: Avoid using strlenW to check if a string is valid.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-05-24 22:17:58 +09:00
Hugh McMaster 1348d9e97b reg/tests: Add tests for 'reg add/delete/query /?'.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-05-14 15:49:05 +09:00
Hugh McMaster 08853dcd03 reg/tests: Add tests for 'reg query'.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-05-14 15:49:03 +09:00
Hugh McMaster 7b9a1a355f reg: Output line break before displaying query output.
This matches Windows' behaviour.

Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-05-04 01:03:29 +09:00
Hugh McMaster 43875a7fae reg: Output the number of matches when querying the registry recursively.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-05-04 01:03:29 +09:00
Hugh McMaster dd5da0ae64 reg: Support recursion when querying a registry value.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-27 12:42:41 +09:00
Hugh McMaster 0c0d839aaa reg: Add /v and /ve support to reg query.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-25 22:10:09 +09:00
Hugh McMaster c81b0494ba reg: Support recursion when querying a registry key.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-25 22:10:09 +09:00
Sebastian Lackner 7c774e9849 reg: Fix a heap corruption when printing specific REG_MULTI_SZ values.
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-04-25 18:48:13 +09:00
Hugh McMaster 6433fee87e reg: Output the data value when querying a registry key.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-22 21:04:37 +09:00
Hugh McMaster bde6d0490e reg: Correctly output the default value name when querying the registry.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-22 21:04:37 +09:00
Hugh McMaster 9042759767 reg: Output the value name and type via a separate function.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-22 21:04:37 +09:00
Hugh McMaster a9b76d0057 reg: Output the value type when querying a registry key.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-22 21:04:37 +09:00
Hugh McMaster 2bd12424c9 reg: Output a list of subkeys when querying a registry key.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-22 21:04:37 +09:00
Hugh McMaster 3035599ad8 reg: Output value names when querying a registry key.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-22 21:04:37 +09:00
Hugh McMaster 3f62729b6e reg: Add initial 'query' support.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-22 21:04:36 +09:00
Hugh McMaster dad56c7dc6 reg: Exit with an error message if RegQueryInfoKeyW fails.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-07 00:59:56 +09:00
Hugh McMaster 31f0d95283 reg: Clean-up and inform the user if RegDeleteValueW fails when deleting all values in a registry key.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-05 00:06:41 +09:00
Hugh McMaster ead76c7e47 reg: Allow values to be added, deleted or modified in root keys.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-22 00:36:28 +09:00
Hugh McMaster bd278b1983 reg: Fail if multiple /v switches are passed in.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-15 21:44:33 +09:00
Hugh McMaster 735dca6074 reg: Fail if /v is passed without an argument.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-15 21:42:50 +09:00
Hugh McMaster 84eed4cf22 reg: Correctly handle cases with no data argument.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-15 19:15:42 +09:00
Hugh McMaster 3762c294d9 reg: Fail if REG_DWORD_BIG_ENDIAN is passed with no data argument.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-04 18:42:10 +09:00
Hugh McMaster 9bfddcf76f reg: Correctly handle /ve commands with no data.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-04 18:42:09 +09:00
Hugh McMaster 9af841ea39 reg/tests: Add more tests for all supported data types.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-03 20:38:57 +09:00
Hugh McMaster 8220a32e0a reg: Display the default value name when ask_confirm() is passed "" for reg_info.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-02 23:31:47 +09:00
Hugh McMaster 81a030b934 reg: Delete the default registry value instead of overwriting it.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-02 23:31:44 +09:00
Hugh McMaster a573f237d0 reg: Fail if the data for REG_MULTI_SZ begins with a separator.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-01 17:45:01 +09:00
Hugh McMaster afa5251b10 reg: Fail if the data for REG_MULTI_SZ contains two adjacent separators.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-01 17:44:59 +09:00
Hugh McMaster b57b998354 reg: Ignore the slash zero character sequence if a custom separator is specified.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-25 21:59:42 +09:00
Hugh McMaster 3cd90a43bb reg/tests: Test handling of null and user-specified separators.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-25 21:59:42 +09:00
Hugh McMaster 47b2238b3d reg: Add support for REG_MULTI_SZ.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-25 00:25:01 +09:00
Hugh McMaster 786eb1a70e reg/tests: Add two more tests for REG_MULTI_SZ.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-25 00:25:01 +09:00
Hugh McMaster 965dee67c1 reg/tests: Add a test for REG_NONE with no data argument.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-23 20:22:22 +09:00
Hugh McMaster 7c50e34efe reg/tests: Add a test for base 10 overflow.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-23 20:22:22 +09:00
Hugh McMaster 3c7b7ece37 reg: Fail if the data value passed with REG_DWORD will cause an overflow.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-23 20:22:21 +09:00
Hugh McMaster 99f2cebe86 reg/tests: Add more tests for REG_MULTI_SZ.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-23 20:22:21 +09:00
Hugh McMaster 5e6429520b reg: Allow either lowercase or uppercase 'x' when used with REG_DWORD.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-23 20:22:21 +09:00
Hugh McMaster 8a902f3761 reg: Fail if the separator for REG_MULTI_SZ is not one character in length.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-18 00:22:05 +09:00
Hugh McMaster 5a2ddc8d25 reg/tests: Add a test for /s with no separator character.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-18 00:22:04 +09:00
Hugh McMaster 46bdc153f1 reg: Fail if /s is used without an accompanying argument.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-18 00:22:04 +09:00
Hugh McMaster acb4e3f63a reg: Explicitly use base 10 or base 16 with strtoulW.
All Windows versions, except XP, parse the number 0123 as decimal.
(XP parses 0123 as octal).

Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-16 23:26:29 +09:00
Hugh McMaster 474361ecb4 reg: Fail if the data argument for REG_DWORD begins with a minus sign.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-16 23:26:29 +09:00
Hugh McMaster 948888b950 reg: Use strtoulW during conversion so we can set any value in the DWORD range.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-16 23:26:29 +09:00
Hugh McMaster 2fd010110a reg: Fail if strtolW cannot convert the entire data string into a DWORD.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-16 23:26:28 +09:00
Hugh McMaster 0f42948bf1 reg/tests: Add two more tests for REG_DWORD.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-16 23:26:28 +09:00
André Hentschel d15a807c3c reg/tests: Use todo_wine_if() in tests.
Signed-off-by: André Hentschel <nerv@dawncrow.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-16 12:09:39 +09:00
Hugh McMaster aa9d2a7c17 reg: Abort the process if get_regdata returns NULL.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-15 21:32:26 +09:00
Hugh McMaster 07c6b1392f reg: Add case for REG_MULTI_SZ.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-15 21:32:01 +09:00
Hugh McMaster b14e1ba801 reg: Handle data for REG_DWORD_LITTLE_ENDIAN and REG_DWORD_BIG_ENDIAN.
REG_DWORD_LITTLE_ENDIAN is #define'd as REG_DWORD, so the LITTLE_ENDIAN
case is just a comment added for clarity.

Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-15 21:31:20 +09:00
Hugh McMaster 03afd26eb1 reg: Handle data for REG_EXPAND_SZ.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-15 21:31:09 +09:00
Hugh McMaster f1d45b5f44 reg: Handle data from REG_NONE.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-15 21:31:03 +09:00
Hugh McMaster 5061899c46 reg: Fail if REG_DWORD is passed with no data argument.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-15 21:30:19 +09:00
Hugh McMaster e0492b27ac reg: Call RegCloseKey before exiting if the user chooses to cancel the overwriting operation.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-15 21:30:17 +09:00
Hugh McMaster 3c340fda68 reg: Fail when /d is used without an accompanying argument.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-11 22:13:28 +09:00
Hugh McMaster 2c0359fb3c reg/tests: Fix incorrect expected value.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-11 22:13:25 +09:00
Hugh McMaster acf0c92943 reg/tests: Add tests for /d with no data argument.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-11 01:26:45 +09:00
Hugh McMaster 20a41d0339 reg: Ask the user if they want to delete the subkey, value, default value or all values.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-11 01:26:44 +09:00
Hugh McMaster a365418ae2 reg: Add support for the default registry value in ask_confirm().
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-11 01:26:43 +09:00
Hugh McMaster a2bdfbae39 reg/tests: Add tests for /v* flags.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-11 01:26:43 +09:00
Hugh McMaster c0b26a649e reg: Do not allow /v and /ve to be used together in the 'add' function.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-11 01:26:43 +09:00
Hugh McMaster c59e3eae3b reg: Do not allow combinations of /v, /ve or /va in the 'delete' function.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-11 01:26:43 +09:00
Hugh McMaster ae48fbafa8 reg: Ask the user whether they want to overwrite an existing registry value.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-09 21:51:10 +09:00
Hugh McMaster 2b06308fdb reg: Output program name instead of the generic 'Error'.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-09 21:49:42 +09:00
Hugh McMaster 5654b91f7c reg: Specify the data type that is unsupported.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-09 21:45:05 +09:00
Hugh McMaster 5f07f81ad1 reg: Output messages with a variable number of arguments and convert message arrays to strings.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-09 21:41:12 +09:00
Hugh McMaster dfe1c2b57c reg: Use FormatMessage for easier internationalization support.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-09 21:39:20 +09:00
Hugh McMaster bfcee1f149 reg: Split reg_printfW into separate functions.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-09 21:39:16 +09:00
Hugh McMaster dcd05e8e86 reg: Remove stub output from the 'add' and 'delete' functions.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-08 20:05:24 +09:00
Hugh McMaster 9e4e1cf9be reg/tests: Fix the add empty type test.
The exit code of this test will always be REG_EXIT_FAILURE,
so the return code is neither broken nor todo_wine.

Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-11-16 17:49:19 +09:00
Jonathan Vollebregt 60f599f584 reg: Simplify root key search.
Signed-off-by: Michel Zou <xantares09@hotmail.com>
Signed-off-by: Stefan Dösinger <stefan@codeweavers.com>
2015-10-07 21:28:54 +09:00
Thomas Faller 5c9526cb6c reg: Implement binary data add operation. 2015-09-07 15:04:49 +09:00
Jonathan Vollebregt 0898bd22bf reg: Add wchar/type conversion functions. 2015-02-23 22:07:07 +09:00
Jonathan Vollebregt 513505d6c4 reg: Add a check for multiple backslashes at the end of the key. 2015-02-23 22:05:55 +09:00
Jonathan Vollebregt 208ca071dc reg: Add sane_path function to do preliminary key validation. 2015-02-23 22:03:34 +09:00
Jonathan Vollebregt 4db1e20122 reg/tests: Test REG_NONE. 2014-12-15 14:16:08 +01:00
Jonathan Vollebregt c15e87cec4 reg/tests: Test for integer overflow. 2014-12-15 14:16:05 +01:00
Sebastian Lackner f6b552324e reg.exe: Fix incorrect usage of CompareString in get_rootkey. 2014-11-19 23:36:34 +09:00
Jonathan Vollebregt e6acf969e7 reg/tests: Test result for deleting key that doesn't exist. 2014-11-07 14:41:33 +09:00
Jonathan Vollebregt 82c6c10428 reg/tests: Test for empty type and empty binary input. 2014-11-06 23:47:13 +09:00
Jonathan Vollebregt 1256177dc2 reg/tests: Move key format test section below first key creation. 2014-11-04 13:27:41 +09:00
Jonathan Vollebregt 375f9c9905 reg/tests: Delete keys manually to prevent timeout on winxp/win2k. 2014-11-04 13:27:24 +09:00
Jonathan Vollebregt f8445249a6 reg/tests: Test key formats. 2014-10-27 14:36:09 +09:00
Jonathan Vollebregt d2e6e210ac reg/tests: Add REG_DWORD_BIG_ENDIAN tests for reg add. 2014-10-24 19:58:04 +09:00
Jonathan Vollebregt 90dcfadf9a reg/tests: Add REG_BINARY tests for reg add. 2014-10-24 19:58:04 +09:00
Jonathan Vollebregt 53a5a837d2 reg/tests: Add REG_MULTI_SZ tests for reg add. 2014-10-24 19:58:04 +09:00