ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
June 2022
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
17 participants
236 discussions
Start a n
N
ew thread
[reactos] 98/158: [WINESYNC] reg/tests: Update error messages.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=513271116760043eaebfc…
commit 513271116760043eaebfcfa54b3f5caf45172d9a Author: winesync <ros-dev(a)reactos.org> AuthorDate: Sun Jan 16 21:17:19 2022 +0100 Commit: Thomas Csovcsity <thc.fr13nd(a)gmail.com> CommitDate: Sun Jun 19 13:06:34 2022 +0200 [WINESYNC] reg/tests: Update error messages. Signed-off-by: Hugh McMaster <hugh.mcmaster(a)outlook.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id 08786274e25461dc1af3684f0e46c896201b28cb by Hugh McMaster <hugh.mcmaster(a)outlook.com> --- modules/rostests/winetests/reg/add.c | 22 +++++++++++----------- sdk/tools/winesync/reg.cfg | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/modules/rostests/winetests/reg/add.c b/modules/rostests/winetests/reg/add.c index 78519565b22..23d0115fd64 100644 --- a/modules/rostests/winetests/reg/add.c +++ b/modules/rostests/winetests/reg/add.c @@ -57,18 +57,18 @@ void verify_reg_(const char *file, unsigned line, HKEY hkey, const char *value, size = sizeof(data); memset(data, 0xdd, size); err = RegQueryValueExA(hkey, value, NULL, &type, data, &size); - lok(err == ERROR_SUCCESS, "RegQueryValueEx failed: got %d\n", err); + lok(err == ERROR_SUCCESS, "RegQueryValueEx failed: got error %d\n", err); if (err != ERROR_SUCCESS) return; todo_wine_if (todo & TODO_REG_TYPE) - lok(type == exp_type, "got wrong type %d, expected %d\n", type, exp_type); + lok(type == exp_type, "got registry type %d, expected %d\n", type, exp_type); todo_wine_if (todo & TODO_REG_SIZE) - lok(size == exp_size, "got wrong size %d, expected %d\n", size, exp_size); + lok(size == exp_size, "got data size %d, expected %d\n", size, exp_size); if (exp_data) { todo_wine_if (todo & TODO_REG_DATA) - lok(memcmp(data, exp_data, size) == 0, "got wrong data\n"); + lok(memcmp(data, exp_data, size) == 0, "registry data does not match\n"); } } @@ -87,7 +87,7 @@ void open_key_(const char *file, unsigned line, const HKEY base, const char *pat LONG err; err = RegOpenKeyExA(base, path, 0, KEY_READ|sam, hkey); - lok(err == ERROR_SUCCESS, "RegOpenKeyExA failed: %d\n", err); + lok(err == ERROR_SUCCESS, "RegOpenKeyExA failed: got error %d\n", err); } void close_key_(const char *file, unsigned line, HKEY hkey) @@ -95,7 +95,7 @@ void close_key_(const char *file, unsigned line, HKEY hkey) LONG err; err = RegCloseKey(hkey); - lok(err == ERROR_SUCCESS, "RegCloseKey failed: %d\n", err); + lok(err == ERROR_SUCCESS, "RegCloseKey failed: got error %d\n", err); } void verify_key_(const char *file, unsigned line, HKEY key_base, const char *subkey) @@ -104,7 +104,7 @@ void verify_key_(const char *file, unsigned line, HKEY key_base, const char *sub LONG err; err = RegOpenKeyExA(key_base, subkey, 0, KEY_READ, &hkey); - lok(err == ERROR_SUCCESS, "RegOpenKeyExA failed: got %d\n", err); + lok(err == ERROR_SUCCESS, "RegOpenKeyExA failed: got error %d\n", err); if (hkey) RegCloseKey(hkey); @@ -130,7 +130,7 @@ void add_key_(const char *file, unsigned line, const HKEY hkey, const char *path err = RegCreateKeyExA(hkey, path, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_READ|KEY_WRITE, NULL, &new_key, NULL); - lok(err == ERROR_SUCCESS, "RegCreateKeyExA failed: %d\n", err); + lok(err == ERROR_SUCCESS, "RegCreateKeyExA failed: got error %d\n", err); if (subkey) *subkey = new_key; @@ -145,7 +145,7 @@ void delete_key_(const char *file, unsigned line, const HKEY hkey, const char *p LONG err; err = RegDeleteKeyA(hkey, path); - lok(err == ERROR_SUCCESS, "RegDeleteKeyA failed: %d\n", err); + lok(err == ERROR_SUCCESS, "RegDeleteKeyA failed: got error %d\n", err); } } @@ -197,7 +197,7 @@ void add_value_(const char *file, unsigned line, HKEY hkey, const char *name, LONG err; err = RegSetValueExA(hkey, name, 0, type, (const BYTE *)data, size); - lok(err == ERROR_SUCCESS, "RegSetValueExA failed: %d\n", err); + lok(err == ERROR_SUCCESS, "RegSetValueExA failed: got error %d\n", err); } void delete_value_(const char *file, unsigned line, const HKEY hkey, const char *name) @@ -205,7 +205,7 @@ void delete_value_(const char *file, unsigned line, const HKEY hkey, const char LONG err; err = RegDeleteValueA(hkey, name); - lok(err == ERROR_SUCCESS, "RegDeleteValueA failed: %d\n", err); + lok(err == ERROR_SUCCESS, "RegDeleteValueA failed: got error %d\n", err); } /* Unit tests */ diff --git a/sdk/tools/winesync/reg.cfg b/sdk/tools/winesync/reg.cfg index a293bf67ea0..553d827ef9a 100644 --- a/sdk/tools/winesync/reg.cfg +++ b/sdk/tools/winesync/reg.cfg @@ -4,4 +4,4 @@ directories: files: programs/reg/resource.h: base/applications/cmdutils/reg/resource.h tags: - wine: 357601a01b894ecdd0e26f5493914192d7ccae6f + wine: 08786274e25461dc1af3684f0e46c896201b28cb
2 years, 6 months
1
0
0
0
[reactos] 97/158: [WINESYNC] reg/tests: Add two REG_DWORD tests.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=44774b38b23faf640d61c…
commit 44774b38b23faf640d61c4fb8df49dc0e73bea8e Author: winesync <ros-dev(a)reactos.org> AuthorDate: Sun Jan 16 21:17:19 2022 +0100 Commit: Thomas Csovcsity <thc.fr13nd(a)gmail.com> CommitDate: Sun Jun 19 13:06:34 2022 +0200 [WINESYNC] reg/tests: Add two REG_DWORD tests. Signed-off-by: Hugh McMaster <hugh.mcmaster(a)outlook.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id 357601a01b894ecdd0e26f5493914192d7ccae6f by Hugh McMaster <hugh.mcmaster(a)outlook.com> --- modules/rostests/winetests/reg/add.c | 10 ++++++++++ sdk/tools/winesync/reg.cfg | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/modules/rostests/winetests/reg/add.c b/modules/rostests/winetests/reg/add.c index 6090b587f92..78519565b22 100644 --- a/modules/rostests/winetests/reg/add.c +++ b/modules/rostests/winetests/reg/add.c @@ -692,6 +692,16 @@ static void test_reg_dword(void) run_reg_exe("reg add HKCU\\" KEY_BASE " /v dword15 /t REG_DWORD /d 4294967296 /f", &r); ok(r == REG_EXIT_FAILURE || broken(r == REG_EXIT_SUCCESS /* WinXP */), "got exit code %u, expected 1\n", r); + run_reg_exe("reg add HKCU\\" KEY_BASE " /v dword16 /t REG_DWORD /d 456 /f", &r); + ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + dword = 456; + verify_reg(hkey, "dword16", REG_DWORD, &dword, sizeof(dword), 0); + + run_reg_exe("reg add HKCU\\" KEY_BASE " /v dword17 /t REG_DWORD /d 0x456 /f", &r); + ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + dword = 0x456; + verify_reg(hkey, "dword17", REG_DWORD, &dword, sizeof(dword), 0); + /* REG_DWORD_LITTLE_ENDIAN */ run_reg_exe("reg add HKCU\\" KEY_BASE " /v DWORD_LE /t REG_DWORD_LITTLE_ENDIAN /d 456 /f", &r); ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); diff --git a/sdk/tools/winesync/reg.cfg b/sdk/tools/winesync/reg.cfg index 2e3becef00b..a293bf67ea0 100644 --- a/sdk/tools/winesync/reg.cfg +++ b/sdk/tools/winesync/reg.cfg @@ -4,4 +4,4 @@ directories: files: programs/reg/resource.h: base/applications/cmdutils/reg/resource.h tags: - wine: a8e961ecacb845b3fc613401431ae9ca37bf9d4b + wine: 357601a01b894ecdd0e26f5493914192d7ccae6f
2 years, 6 months
1
0
0
0
[reactos] 96/158: [WINESYNC] reg/tests: Fix a typo in a REG_DWORD test.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=a260cccef685691a45eaa…
commit a260cccef685691a45eaa15fe95b4d59c9b0a7c5 Author: winesync <ros-dev(a)reactos.org> AuthorDate: Sun Jan 16 21:17:19 2022 +0100 Commit: Thomas Csovcsity <thc.fr13nd(a)gmail.com> CommitDate: Sun Jun 19 13:06:34 2022 +0200 [WINESYNC] reg/tests: Fix a typo in a REG_DWORD test. Signed-off-by: Hugh McMaster <hugh.mcmaster(a)outlook.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id a8e961ecacb845b3fc613401431ae9ca37bf9d4b by Hugh McMaster <hugh.mcmaster(a)outlook.com> --- modules/rostests/winetests/reg/add.c | 2 +- sdk/tools/winesync/reg.cfg | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/rostests/winetests/reg/add.c b/modules/rostests/winetests/reg/add.c index f6a4a7fe576..6090b587f92 100644 --- a/modules/rostests/winetests/reg/add.c +++ b/modules/rostests/winetests/reg/add.c @@ -673,7 +673,7 @@ static void test_reg_dword(void) run_reg_exe("reg add HKCU\\" KEY_BASE " /t REG_DWORD /v dword10 /f /d -0x1", &r); ok(r == REG_EXIT_FAILURE || broken(r == REG_EXIT_SUCCESS /* WinXP */), "got exit code %u, expected 1\n", r); - run_reg_exe("reg add HKCU\\" KEY_BASE " /v dword8 /t REG_dword /d 0x01ffffffff /f", &r); + run_reg_exe("reg add HKCU\\" KEY_BASE " /v dword11 /t REG_dword /d 0x01ffffffff /f", &r); ok(r == REG_EXIT_FAILURE || broken(r == REG_EXIT_SUCCESS /* WinXP */), "got exit code %d, expected 1\n", r); run_reg_exe("reg add HKCU\\" KEY_BASE " /v dword12 /t REG_DWORD /d 0xffffffff /f", &r); diff --git a/sdk/tools/winesync/reg.cfg b/sdk/tools/winesync/reg.cfg index c7fbe250e85..2e3becef00b 100644 --- a/sdk/tools/winesync/reg.cfg +++ b/sdk/tools/winesync/reg.cfg @@ -4,4 +4,4 @@ directories: files: programs/reg/resource.h: base/applications/cmdutils/reg/resource.h tags: - wine: 94b582b1a68cd07676618144537465bdf21d1847 + wine: a8e961ecacb845b3fc613401431ae9ca37bf9d4b
2 years, 6 months
1
0
0
0
[reactos] 95/158: [WINESYNC] reg/tests: Split the REG_DWORD_BIG_ENDIAN tests from the REG_DWORD tests.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=fe627c0e6a3e317a527a5…
commit fe627c0e6a3e317a527a5d9a12709ffae2a2b3e4 Author: winesync <ros-dev(a)reactos.org> AuthorDate: Sun Jan 16 21:17:19 2022 +0100 Commit: Thomas Csovcsity <thc.fr13nd(a)gmail.com> CommitDate: Sun Jun 19 13:06:34 2022 +0200 [WINESYNC] reg/tests: Split the REG_DWORD_BIG_ENDIAN tests from the REG_DWORD tests. Signed-off-by: Hugh McMaster <hugh.mcmaster(a)outlook.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id 94b582b1a68cd07676618144537465bdf21d1847 by Hugh McMaster <hugh.mcmaster(a)outlook.com> --- modules/rostests/winetests/reg/add.c | 43 +++++++++++++++++++++++++----------- sdk/tools/winesync/reg.cfg | 2 +- 2 files changed, 31 insertions(+), 14 deletions(-) diff --git a/modules/rostests/winetests/reg/add.c b/modules/rostests/winetests/reg/add.c index d2d09e79ce6..f6a4a7fe576 100644 --- a/modules/rostests/winetests/reg/add.c +++ b/modules/rostests/winetests/reg/add.c @@ -698,22 +698,38 @@ static void test_reg_dword(void) dword = 456; verify_reg(hkey, "DWORD_LE", REG_DWORD_LITTLE_ENDIAN, &dword, sizeof(dword), 0); - /* REG_DWORD_BIG_ENDIAN */ - run_reg_exe("reg add HKCU\\" KEY_BASE " /v DWORD_BE /t REG_DWORD_BIG_ENDIAN /d 456 /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %u, expected 0\n", r); - dword = 456; - verify_reg(hkey, "DWORD_BE", REG_DWORD_BIG_ENDIAN, &dword, sizeof(dword), 0); - /* REG_DWORD_BIG_ENDIAN is broken in every version of windows. It behaves like - * an ordinary REG_DWORD - that is little endian. GG */ - - run_reg_exe("reg add HKCU\\" KEY_BASE " /v DWORD_BE2 /t REG_DWORD_BIG_ENDIAN /f /d", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %u, expected 1\n", r); + close_key(hkey); + delete_key(HKEY_CURRENT_USER, KEY_BASE); +} - run_reg_exe("reg add HKCU\\" KEY_BASE " /v DWORD_BE3 /t REG_DWORD_BIG_ENDIAN /f", &r); - ok(r == REG_EXIT_FAILURE || broken(r == REG_EXIT_SUCCESS /* WinXP */), "got exit code %u, expected 1\n", r); +/* REG_DWORD_BIG_ENDIAN is broken in every version of Windows. It behaves + * like an ordinary REG_DWORD, which is little endian. + */ +static void test_reg_dword_big_endian(void) +{ + HKEY hkey; + DWORD r, dword; run_reg_exe("reg add HKCU\\" KEY_BASE " /ve /t REG_DWORD_BIG_ENDIAN /f", &r); - ok(r == REG_EXIT_FAILURE || broken(r == REG_EXIT_SUCCESS /* WinXP */), "got exit code %u, expected 1\n", r); + ok(r == REG_EXIT_FAILURE || broken(r == REG_EXIT_SUCCESS /* WinXP */), "got exit code %d, expected 1\n", r); + + run_reg_exe("reg add HKCU\\" KEY_BASE " /v Test1 /t REG_DWORD_BIG_ENDIAN /f /d", &r); + ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + + run_reg_exe("reg add HKCU\\" KEY_BASE " /v Test2 /t REG_DWORD_BIG_ENDIAN /f", &r); + ok(r == REG_EXIT_FAILURE || broken(r == REG_EXIT_SUCCESS /* WinXP */), "got exit code %d, expected 1\n", r); + + add_key(HKEY_CURRENT_USER, KEY_BASE, &hkey); + + run_reg_exe("reg add HKCU\\" KEY_BASE " /v Test3 /t REG_DWORD_BIG_ENDIAN /d 456 /f", &r); + ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + dword = 456; + verify_reg(hkey, "Test3", REG_DWORD_BIG_ENDIAN, &dword, sizeof(dword), 0); + + run_reg_exe("reg add HKCU\\" KEY_BASE " /v Test4 /t REG_DWORD_BIG_ENDIAN /d 0x456 /f", &r); + ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + dword = 0x456; + verify_reg(hkey, "Test4", REG_DWORD_BIG_ENDIAN, &dword, sizeof(dword), 0); close_key(hkey); delete_key(HKEY_CURRENT_USER, KEY_BASE); @@ -835,5 +851,6 @@ START_TEST(add) test_reg_expand_sz(); test_reg_binary(); test_reg_dword(); + test_reg_dword_big_endian(); test_reg_multi_sz(); } diff --git a/sdk/tools/winesync/reg.cfg b/sdk/tools/winesync/reg.cfg index dd7f0d35195..c7fbe250e85 100644 --- a/sdk/tools/winesync/reg.cfg +++ b/sdk/tools/winesync/reg.cfg @@ -4,4 +4,4 @@ directories: files: programs/reg/resource.h: base/applications/cmdutils/reg/resource.h tags: - wine: 1110421da93ebd6cc2648008fed874a49b8bbf28 + wine: 94b582b1a68cd07676618144537465bdf21d1847
2 years, 6 months
1
0
0
0
[reactos] 94/158: [WINESYNC] reg/tests: Use string literals instead of a char buffer for REG_MULTI_SZ tests.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=6802956e338e0fe5548fa…
commit 6802956e338e0fe5548faa4908cffc6ed0c1c411 Author: winesync <ros-dev(a)reactos.org> AuthorDate: Sun Jan 16 21:17:19 2022 +0100 Commit: Thomas Csovcsity <thc.fr13nd(a)gmail.com> CommitDate: Sun Jun 19 13:06:34 2022 +0200 [WINESYNC] reg/tests: Use string literals instead of a char buffer for REG_MULTI_SZ tests. Signed-off-by: Hugh McMaster <hugh.mcmaster(a)outlook.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id 1110421da93ebd6cc2648008fed874a49b8bbf28 by Hugh McMaster <hugh.mcmaster(a)outlook.com> --- modules/rostests/winetests/reg/add.c | 25 ++++++++++--------------- sdk/tools/winesync/reg.cfg | 2 +- 2 files changed, 11 insertions(+), 16 deletions(-) diff --git a/modules/rostests/winetests/reg/add.c b/modules/rostests/winetests/reg/add.c index 3ac4ca800dd..d2d09e79ce6 100644 --- a/modules/rostests/winetests/reg/add.c +++ b/modules/rostests/winetests/reg/add.c @@ -723,37 +723,34 @@ static void test_reg_multi_sz(void) { HKEY hkey; DWORD r; - char buffer[22]; add_key(HKEY_CURRENT_USER, KEY_BASE, &hkey); run_reg_exe("reg add HKCU\\" KEY_BASE " /t REG_MULTI_SZ /f", &r); ok(r == REG_EXIT_SUCCESS, "got exit code %u, expected 0\n", r); - buffer[0] = 0; - todo_wine verify_reg(hkey, NULL, REG_MULTI_SZ, buffer, 1, 0); + todo_wine verify_reg(hkey, NULL, REG_MULTI_SZ, "", 1, 0); todo_wine delete_value(hkey, NULL); run_reg_exe("reg add HKCU\\" KEY_BASE " /ve /t REG_MULTI_SZ /f", &r); ok(r == REG_EXIT_SUCCESS, "got exit code %u, expected 0\n", r); - verify_reg(hkey, NULL, REG_MULTI_SZ, buffer, 1, 0); + verify_reg(hkey, NULL, REG_MULTI_SZ, "", 1, 0); run_reg_exe("reg add HKCU\\" KEY_BASE " /v multi0 /t REG_MULTI_SZ /d \"three\\0little\\0strings\" /f", &r); ok(r == REG_EXIT_SUCCESS, "got exit code %u, expected 0\n", r); - memcpy(buffer, "three\0little\0strings\0", 22); - verify_reg(hkey, "multi0", REG_MULTI_SZ, buffer, 22, 0); + verify_reg(hkey, "multi0", REG_MULTI_SZ, "three\0little\0strings\0", 22, 0); run_reg_exe("reg add HKCU\\" KEY_BASE " /t REG_MULTI_SZ /v multi1 /s \"#\" /d \"three#little#strings\" /f", &r); ok(r == REG_EXIT_SUCCESS, "got exit code %u, expected 0\n", r); - verify_reg(hkey, "multi1", REG_MULTI_SZ, buffer, 22, 0); + verify_reg(hkey, "multi1", REG_MULTI_SZ, "three\0little\0strings\0", 22, 0); run_reg_exe("reg add HKCU\\" KEY_BASE " /t REG_MULTI_SZ /v multi2 /d \"\" /f", &r); ok(r == REG_EXIT_SUCCESS, "got exit code %u, expected 0\n", r); - verify_reg(hkey, "multi2", REG_MULTI_SZ, &buffer[21], 1, 0); + verify_reg(hkey, "multi2", REG_MULTI_SZ, "", 1, 0); run_reg_exe("reg add HKCU\\" KEY_BASE " /t REG_MULTI_SZ /v multi3 /f", &r); ok(r == REG_EXIT_SUCCESS, "got exit code %u, expected 0\n", r); - verify_reg(hkey, "multi3", REG_MULTI_SZ, &buffer[21], 1, 0); + verify_reg(hkey, "multi3", REG_MULTI_SZ, "", 1, 0); run_reg_exe("reg add HKCU\\" KEY_BASE " /t REG_MULTI_SZ /v multi4 /s \"#\" /d \"threelittlestrings\" /f", &r); ok(r == REG_EXIT_SUCCESS, "got exit code %u, expected 0\n", r); @@ -779,8 +776,7 @@ static void test_reg_multi_sz(void) run_reg_exe("reg add HKCU\\" KEY_BASE " /t REG_MULTI_SZ /v multi11 /s \"#\" /d \"a#\" /f", &r); ok(r == REG_EXIT_SUCCESS, "got exit code %u, expected 0\n", r); - buffer[0]='a'; buffer[1]=0; buffer[2]=0; - verify_reg(hkey, "multi11", REG_MULTI_SZ, buffer, 3, 0); + verify_reg(hkey, "multi11", REG_MULTI_SZ, "a\0", 3, 0); run_reg_exe("reg add HKCU\\" KEY_BASE " /v multi12 /t REG_MULTI_SZ /f /d", &r); ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); @@ -793,19 +789,18 @@ static void test_reg_multi_sz(void) run_reg_exe("reg add HKCU\\" KEY_BASE " /v multi15 /t REG_MULTI_SZ /d \"a\\0\" /f", &r); ok(r == REG_EXIT_SUCCESS, "got exit code %u, expected 0\n", r); - verify_reg(hkey, "multi15", REG_MULTI_SZ, buffer, 3, 0); + verify_reg(hkey, "multi15", REG_MULTI_SZ, "a\0", 3, 0); run_reg_exe("reg add HKCU\\" KEY_BASE " /t REG_MULTI_SZ /v multi16 /d \"two\\0\\0strings\" /f", &r); ok(r == REG_EXIT_FAILURE, "got exit code %u, expected 1\n", r); run_reg_exe("reg add HKCU\\" KEY_BASE " /v multi17 /t REG_MULTI_SZ /s \"#\" /d \"#\" /f", &r); ok(r == REG_EXIT_SUCCESS, "got exit code %u, expected 0\n", r); - buffer[0] = 0; buffer[1] = 0; - verify_reg(hkey, "multi17", REG_MULTI_SZ, buffer, 2, 0); + verify_reg(hkey, "multi17", REG_MULTI_SZ, "\0", 2, 0); run_reg_exe("reg add HKCU\\" KEY_BASE " /v multi18 /t REG_MULTI_SZ /d \"\\0\" /f", &r); ok(r == REG_EXIT_SUCCESS, "got exit code %u, expected 0\n", r); - verify_reg(hkey, "multi18", REG_MULTI_SZ, buffer, 2, 0); + verify_reg(hkey, "multi18", REG_MULTI_SZ, "\0", 2, 0); run_reg_exe("reg add HKCU\\" KEY_BASE " /v multi19 /t REG_MULTI_SZ /s \"#\" /d \"two\\0#strings\" /f", &r); ok(r == REG_EXIT_SUCCESS, "got exit code %u, expected 0\n", r); diff --git a/sdk/tools/winesync/reg.cfg b/sdk/tools/winesync/reg.cfg index 82f3f0400ff..dd7f0d35195 100644 --- a/sdk/tools/winesync/reg.cfg +++ b/sdk/tools/winesync/reg.cfg @@ -4,4 +4,4 @@ directories: files: programs/reg/resource.h: base/applications/cmdutils/reg/resource.h tags: - wine: 1aae492dcbb2a0a7725a9cff40edd6a355f7fc79 + wine: 1110421da93ebd6cc2648008fed874a49b8bbf28
2 years, 6 months
1
0
0
0
[reactos] 93/158: [WINESYNC] reg/tests: Add and amend tests adding a (Default) value.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=5e7302ebfd8eef6878cd4…
commit 5e7302ebfd8eef6878cd41862cf24acb1baf14fb Author: winesync <ros-dev(a)reactos.org> AuthorDate: Sun Jan 16 21:17:19 2022 +0100 Commit: Thomas Csovcsity <thc.fr13nd(a)gmail.com> CommitDate: Sun Jun 19 13:06:34 2022 +0200 [WINESYNC] reg/tests: Add and amend tests adding a (Default) value. Signed-off-by: Hugh McMaster <hugh.mcmaster(a)outlook.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id 1aae492dcbb2a0a7725a9cff40edd6a355f7fc79 by Hugh McMaster <hugh.mcmaster(a)outlook.com> --- modules/rostests/winetests/reg/add.c | 71 +++++++++++++++++++++++++----------- sdk/tools/winesync/reg.cfg | 2 +- 2 files changed, 51 insertions(+), 22 deletions(-) diff --git a/modules/rostests/winetests/reg/add.c b/modules/rostests/winetests/reg/add.c index fdd09c885bc..3ac4ca800dd 100644 --- a/modules/rostests/winetests/reg/add.c +++ b/modules/rostests/winetests/reg/add.c @@ -404,6 +404,16 @@ static void test_reg_none(void) add_key(HKEY_CURRENT_USER, KEY_BASE, &hkey); + run_reg_exe("reg add HKCU\\" KEY_BASE " /t REG_NONE /f", &r); + ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + todo_wine verify_reg(hkey, NULL, REG_NONE, "\0", 2, 0); + + todo_wine delete_value(hkey, NULL); + + run_reg_exe("reg add HKCU\\" KEY_BASE " /ve /t REG_NONE /f", &r); + ok(r == REG_EXIT_SUCCESS, "got exit code %u, expected 0\n", r); + verify_reg(hkey, NULL, REG_NONE, "\0", 2, 0); + run_reg_exe("reg add HKCU\\" KEY_BASE " /v none0 /d deadbeef /t REG_NONE /f", &r); ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); verify_reg(hkey, "none0", REG_NONE, "d\0e\0a\0d\0b\0e\0e\0f\0\0", 18, 0); @@ -412,10 +422,6 @@ static void test_reg_none(void) ok(r == REG_EXIT_SUCCESS, "got exit code %u, expected 0\n", r); verify_reg(hkey, "none1", REG_NONE, "\0", 2, 0); - run_reg_exe("reg add HKCU\\" KEY_BASE " /ve /t REG_NONE /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %u, expected 0\n", r); - verify_reg(hkey, NULL, REG_NONE, "\0", 2, 0); - close_key(hkey); delete_key(HKEY_CURRENT_USER, KEY_BASE); } @@ -427,6 +433,10 @@ static void test_reg_sz(void) add_key(HKEY_CURRENT_USER, KEY_BASE, &hkey); + run_reg_exe("reg add HKCU\\" KEY_BASE " /t REG_SZ /f", &r); + ok(r == REG_EXIT_SUCCESS, "got exit code %u, expected 0\n", r); + todo_wine verify_reg(hkey, NULL, REG_SZ, "", 1, 0); + run_reg_exe("reg add HKCU\\" KEY_BASE " /d WineTest /f", &r); ok(r == REG_EXIT_SUCCESS || broken(r == REG_EXIT_FAILURE /* WinXP */), "got exit code %d, expected 0\n", r); @@ -501,6 +511,16 @@ static void test_reg_expand_sz(void) add_key(HKEY_CURRENT_USER, KEY_BASE, &hkey); + run_reg_exe("reg add HKCU\\" KEY_BASE " /t REG_EXPAND_SZ /f", &r); + ok(r == REG_EXIT_SUCCESS, "got exit code %u, expected 0\n", r); + todo_wine verify_reg(hkey, NULL, REG_EXPAND_SZ, "", 1, 0); + + todo_wine delete_value(hkey, NULL); + + run_reg_exe("reg add HKCU\\" KEY_BASE " /ve /t REG_EXPAND_SZ /f", &r); + ok(r == REG_EXIT_SUCCESS, "got exit code %u, expected 0\n", r); + verify_reg(hkey, NULL, REG_EXPAND_SZ, "", 1, 0); + run_reg_exe("reg add HKCU\\" KEY_BASE " /v expand0 /t REG_EXpand_sz /d \"dead%PATH%beef\" /f", &r); ok(r == REG_EXIT_SUCCESS, "got exit code %u, expected 0\n", r); verify_reg(hkey, "expand0", REG_EXPAND_SZ, "dead%PATH%beef", 15, 0); @@ -521,10 +541,6 @@ static void test_reg_expand_sz(void) ok(r == REG_EXIT_SUCCESS, "got exit code %u, expected 0\n", r); verify_reg(hkey, "expand3", REG_EXPAND_SZ, "", 1, 0); - run_reg_exe("reg add HKCU\\" KEY_BASE " /ve /t REG_EXPAND_SZ /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %u, expected 0\n", r); - verify_reg(hkey, NULL, REG_EXPAND_SZ, "", 1, 0); - close_key(hkey); delete_key(HKEY_CURRENT_USER, KEY_BASE); } @@ -538,15 +554,25 @@ static void test_reg_binary(void) add_key(HKEY_CURRENT_USER, KEY_BASE, &hkey); - run_reg_exe("reg add HKCU\\" KEY_BASE " /t REG_BINARY /v bin0 /f", &r); + run_reg_exe("reg add HKCU\\" KEY_BASE " /t REG_BINARY /f", &r); ok(r == REG_EXIT_SUCCESS, "got exit code %u, expected 0\n", r); - verify_reg(hkey, "bin0", REG_BINARY, buffer, 0, 0); + todo_wine verify_reg(hkey, NULL, REG_BINARY, buffer, 0, 0); + + todo_wine delete_value(hkey, NULL); + + run_reg_exe("reg add HKCU\\" KEY_BASE " /ve /t REG_BINARY /f", &r); + ok(r == REG_EXIT_SUCCESS, "got exit code %u, expected 0\n", r); + verify_reg(hkey, NULL, REG_BINARY, buffer, 0, 0); run_reg_exe("reg add HKEY_CURRENT_USER\\" KEY_BASE " /ve /t REG_BINARY /d deadbeef /f", &r); ok(r == REG_EXIT_SUCCESS, "got exit code %u, expected 0\n", r); dword = 0xefbeadde; verify_reg(hkey, "", REG_BINARY, &dword, sizeof(DWORD), 0); + run_reg_exe("reg add HKCU\\" KEY_BASE " /t REG_BINARY /v bin0 /f", &r); + ok(r == REG_EXIT_SUCCESS, "got exit code %u, expected 0\n", r); + verify_reg(hkey, "bin0", REG_BINARY, buffer, 0, 0); + run_reg_exe("reg add HKCU\\" KEY_BASE " /t REG_BINARY /v bin1 /f /d 0xDeAdBeEf", &r); ok(r == REG_EXIT_FAILURE, "got exit code %u, expected 1\n", r); @@ -579,10 +605,6 @@ static void test_reg_binary(void) run_reg_exe("reg add HKCU\\" KEY_BASE " /v bin6 /t REG_BINARY /f /d", &r); ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); - run_reg_exe("reg add HKCU\\" KEY_BASE " /ve /t REG_BINARY /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %u, expected 0\n", r); - verify_reg(hkey, NULL, REG_BINARY, buffer, 0, 0); - close_key(hkey); delete_key(HKEY_CURRENT_USER, KEY_BASE); } @@ -604,6 +626,9 @@ static void test_reg_dword(void) else win_skip("broken reg.exe detected\n"); + run_reg_exe("reg add HKCU\\" KEY_BASE " /ve /t REG_DWORD /f", &r); + ok(r == REG_EXIT_FAILURE || broken(r == REG_EXIT_SUCCESS /* WinXP */), "got exit code %u, expected 1\n", r); + run_reg_exe("reg add HKCU\\" KEY_BASE " /v dword0 /t REG_DWORD /f /d", &r); ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); @@ -667,9 +692,6 @@ static void test_reg_dword(void) run_reg_exe("reg add HKCU\\" KEY_BASE " /v dword15 /t REG_DWORD /d 4294967296 /f", &r); ok(r == REG_EXIT_FAILURE || broken(r == REG_EXIT_SUCCESS /* WinXP */), "got exit code %u, expected 1\n", r); - run_reg_exe("reg add HKCU\\" KEY_BASE " /ve /t REG_DWORD /f", &r); - ok(r == REG_EXIT_FAILURE || broken(r == REG_EXIT_SUCCESS /* WinXP */), "got exit code %u, expected 1\n", r); - /* REG_DWORD_LITTLE_ENDIAN */ run_reg_exe("reg add HKCU\\" KEY_BASE " /v DWORD_LE /t REG_DWORD_LITTLE_ENDIAN /d 456 /f", &r); ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); @@ -705,6 +727,17 @@ static void test_reg_multi_sz(void) add_key(HKEY_CURRENT_USER, KEY_BASE, &hkey); + run_reg_exe("reg add HKCU\\" KEY_BASE " /t REG_MULTI_SZ /f", &r); + ok(r == REG_EXIT_SUCCESS, "got exit code %u, expected 0\n", r); + buffer[0] = 0; + todo_wine verify_reg(hkey, NULL, REG_MULTI_SZ, buffer, 1, 0); + + todo_wine delete_value(hkey, NULL); + + run_reg_exe("reg add HKCU\\" KEY_BASE " /ve /t REG_MULTI_SZ /f", &r); + ok(r == REG_EXIT_SUCCESS, "got exit code %u, expected 0\n", r); + verify_reg(hkey, NULL, REG_MULTI_SZ, buffer, 1, 0); + run_reg_exe("reg add HKCU\\" KEY_BASE " /v multi0 /t REG_MULTI_SZ /d \"three\\0little\\0strings\" /f", &r); ok(r == REG_EXIT_SUCCESS, "got exit code %u, expected 0\n", r); memcpy(buffer, "three\0little\0strings\0", 22); @@ -786,10 +819,6 @@ static void test_reg_multi_sz(void) ok(r == REG_EXIT_SUCCESS, "got exit code %u, expected 0\n", r); verify_reg(hkey, "multi21", REG_MULTI_SZ, "two\\0\\0strings\0", 16, 0); - run_reg_exe("reg add HKCU\\" KEY_BASE " /ve /t REG_MULTI_SZ /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %u, expected 0\n", r); - verify_reg(hkey, NULL, REG_MULTI_SZ, buffer, 1, 0); - close_key(hkey); delete_key(HKEY_CURRENT_USER, KEY_BASE); } diff --git a/sdk/tools/winesync/reg.cfg b/sdk/tools/winesync/reg.cfg index f322b64ccc7..82f3f0400ff 100644 --- a/sdk/tools/winesync/reg.cfg +++ b/sdk/tools/winesync/reg.cfg @@ -4,4 +4,4 @@ directories: files: programs/reg/resource.h: base/applications/cmdutils/reg/resource.h tags: - wine: dedcd7c100461cf8be46387ebd65b60488c13ecf + wine: 1aae492dcbb2a0a7725a9cff40edd6a355f7fc79
2 years, 6 months
1
0
0
0
[reactos] 92/158: [WINESYNC] reg: Use correct error message if RegCreateKeyExW() fails.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=123e459be571684e58403…
commit 123e459be571684e584031beef5b92da66fbfdbb Author: winesync <ros-dev(a)reactos.org> AuthorDate: Sun Jan 16 21:15:48 2022 +0100 Commit: Thomas Csovcsity <thc.fr13nd(a)gmail.com> CommitDate: Sun Jun 19 13:06:34 2022 +0200 [WINESYNC] reg: Use correct error message if RegCreateKeyExW() fails. Signed-off-by: Hugh McMaster <hugh.mcmaster(a)outlook.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id dedcd7c100461cf8be46387ebd65b60488c13ecf by Hugh McMaster <hugh.mcmaster(a)outlook.com> manual adjustment needed --- base/applications/cmdutils/reg/add.c | 2 +- base/applications/cmdutils/reg/lang/en-US.rc | 1 + base/applications/cmdutils/reg/resource.h | 1 + sdk/tools/winesync/reg.cfg | 2 +- 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/base/applications/cmdutils/reg/add.c b/base/applications/cmdutils/reg/add.c index ff209bfc0ff..db909167f30 100644 --- a/base/applications/cmdutils/reg/add.c +++ b/base/applications/cmdutils/reg/add.c @@ -157,7 +157,7 @@ static int run_add(HKEY root, WCHAR *path, WCHAR *value_name, BOOL value_empty, if (RegCreateKeyExW(root, path, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_READ|KEY_WRITE, NULL, &hkey, NULL)) { - output_message(STRING_INVALID_KEY); + output_message(STRING_ACCESS_DENIED); return 1; } diff --git a/base/applications/cmdutils/reg/lang/en-US.rc b/base/applications/cmdutils/reg/lang/en-US.rc index 97b55e6eda1..060ac3f9d29 100644 --- a/base/applications/cmdutils/reg/lang/en-US.rc +++ b/base/applications/cmdutils/reg/lang/en-US.rc @@ -152,4 +152,5 @@ STRINGTABLE \ Access the registry using the 32-bit view.\n\n\ \ /reg:64\n\ \ Access the registry using the 64-bit view.\n\n" + STRING_ACCESS_DENIED, "reg: Unable to access or create the specified registry key\n" } diff --git a/base/applications/cmdutils/reg/resource.h b/base/applications/cmdutils/reg/resource.h index c1698e91c7e..3e148854ff5 100644 --- a/base/applications/cmdutils/reg/resource.h +++ b/base/applications/cmdutils/reg/resource.h @@ -64,3 +64,4 @@ #define STRING_KEY_NONEXIST 139 #define STRING_KEY_IMPORT_FAILED 140 #define STRING_REG_VIEW_USAGE 141 +#define STRING_ACCESS_DENIED 142 diff --git a/sdk/tools/winesync/reg.cfg b/sdk/tools/winesync/reg.cfg index a1273c41652..f322b64ccc7 100644 --- a/sdk/tools/winesync/reg.cfg +++ b/sdk/tools/winesync/reg.cfg @@ -4,4 +4,4 @@ directories: files: programs/reg/resource.h: base/applications/cmdutils/reg/resource.h tags: - wine: 8203c5db0248d38f06af55411ac4f4c89976fad2 + wine: dedcd7c100461cf8be46387ebd65b60488c13ecf
2 years, 6 months
1
0
0
0
[reactos] 91/158: [WINESYNC] reg/tests: Verify that only the (Default) value is overwritten when neither /v nor /ve is specified.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=40d62f3c5bd37411b35c3…
commit 40d62f3c5bd37411b35c3faea4bc8311d18a11f3 Author: winesync <ros-dev(a)reactos.org> AuthorDate: Sun Jan 16 21:15:48 2022 +0100 Commit: Thomas Csovcsity <thc.fr13nd(a)gmail.com> CommitDate: Sun Jun 19 13:06:34 2022 +0200 [WINESYNC] reg/tests: Verify that only the (Default) value is overwritten when neither /v nor /ve is specified. Signed-off-by: Hugh McMaster <hugh.mcmaster(a)outlook.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id 8203c5db0248d38f06af55411ac4f4c89976fad2 by Hugh McMaster <hugh.mcmaster(a)outlook.com> --- modules/rostests/winetests/reg/add.c | 9 +++++++++ sdk/tools/winesync/reg.cfg | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/modules/rostests/winetests/reg/add.c b/modules/rostests/winetests/reg/add.c index 6973eefd892..fdd09c885bc 100644 --- a/modules/rostests/winetests/reg/add.c +++ b/modules/rostests/winetests/reg/add.c @@ -384,6 +384,15 @@ static void test_add(void) verify_reg(hkey, "Test2", REG_DWORD, &dword, sizeof(dword), 0); todo_wine verify_reg(hkey, NULL, REG_SZ, "", 1, 0); + run_reg_exe("reg add HKCU\\" KEY_BASE " /t REG_NONE /d Test /f", &r); + ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + + verify_key(HKEY_CURRENT_USER, KEY_BASE); + verify_key(hkey, "Subkey"); + verify_reg(hkey, "Test1", REG_SZ, "Value1", 7, 0); + verify_reg(hkey, "Test2", REG_DWORD, &dword, sizeof(dword), 0); + verify_reg(hkey, NULL, REG_NONE, "T\0e\0s\0t\0\0", 10, 0); + close_key(hkey); delete_tree(HKEY_CURRENT_USER, KEY_BASE); } diff --git a/sdk/tools/winesync/reg.cfg b/sdk/tools/winesync/reg.cfg index 7a1a3cce2db..a1273c41652 100644 --- a/sdk/tools/winesync/reg.cfg +++ b/sdk/tools/winesync/reg.cfg @@ -4,4 +4,4 @@ directories: files: programs/reg/resource.h: base/applications/cmdutils/reg/resource.h tags: - wine: 1ce21dbb5f2eed468c3748a2de1f25744e10e04c + wine: 8203c5db0248d38f06af55411ac4f4c89976fad2
2 years, 6 months
1
0
0
0
[reactos] 90/158: [WINESYNC] reg/tests: Rework syntax tests for the 'copy' operation.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=1aea6bdfcf4c4491ead88…
commit 1aea6bdfcf4c4491ead883ace1ca8a220645eafc Author: winesync <ros-dev(a)reactos.org> AuthorDate: Sun Jan 16 21:15:48 2022 +0100 Commit: Thomas Csovcsity <thc.fr13nd(a)gmail.com> CommitDate: Sun Jun 19 13:06:34 2022 +0200 [WINESYNC] reg/tests: Rework syntax tests for the 'copy' operation. Signed-off-by: Hugh McMaster <hugh.mcmaster(a)outlook.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id 1ce21dbb5f2eed468c3748a2de1f25744e10e04c by Hugh McMaster <hugh.mcmaster(a)outlook.com> --- modules/rostests/winetests/reg/copy.c | 32 +++++++++++++++----------------- sdk/tools/winesync/reg.cfg | 2 +- 2 files changed, 16 insertions(+), 18 deletions(-) diff --git a/modules/rostests/winetests/reg/copy.c b/modules/rostests/winetests/reg/copy.c index a8956d7e9a0..31223a3d314 100644 --- a/modules/rostests/winetests/reg/copy.c +++ b/modules/rostests/winetests/reg/copy.c @@ -18,15 +18,12 @@ #include "reg_test.h" -#define COPY_DEST KEY_WINE "\\reg_copy" +#define COPY_SRC KEY_WINE "\\reg_copy" -static void test_copy(void) +static void test_command_syntax(void) { DWORD r; - delete_tree(HKEY_CURRENT_USER, KEY_BASE); - verify_key_nonexist(HKEY_CURRENT_USER, KEY_BASE); - run_reg_exe("reg copy", &r); ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); @@ -63,37 +60,38 @@ static void test_copy(void) run_reg_exe("reg copy /f /s", &r); ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); - run_reg_exe("reg copy HKEY_CURRENT_USER\\" KEY_BASE " /f", &r); + run_reg_exe("reg copy HKCU\\" COPY_SRC " /f", &r); ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); - run_reg_exe("reg copy HKEY_CURRENT_USER\\" KEY_BASE " foo /f", &r); + run_reg_exe("reg copy HKCU\\" COPY_SRC " foo /f", &r); ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); - run_reg_exe("reg copy /f HKEY_CURRENT_USER\\" KEY_BASE " HKEY_CURRENT_USER\\" KEY_BASE, &r); + run_reg_exe("reg copy /f HKCU\\" COPY_SRC " HKCU\\" KEY_BASE, &r); ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); - run_reg_exe("reg copy /f HKEY_CURRENT_USER\\" KEY_BASE " HKEY_CURRENT_USER\\" COPY_DEST, &r); + run_reg_exe("reg copy HKCU\\" COPY_SRC " /f HKCU\\" KEY_BASE, &r); ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); - run_reg_exe("reg copy HKEY_CURRENT_USER\\" KEY_BASE " /f HKEY_CURRENT_USER\\" COPY_DEST, &r); + run_reg_exe("reg copy HKCU\\" COPY_SRC " /s HKCU\\" KEY_BASE, &r); ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); - run_reg_exe("reg copy HKEY_CURRENT_USER\\" KEY_BASE " /s HKEY_CURRENT_USER\\" COPY_DEST, &r); + run_reg_exe("reg copy HKCU\\" COPY_SRC " HKCU\\" KEY_BASE " /a", &r); ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); - run_reg_exe("reg copy HKEY_CURRENT_USER\\" KEY_BASE " HKEY_CURRENT_USER\\" COPY_DEST " /a", &r); + run_reg_exe("reg copy HKCU\\" COPY_SRC " HKCU\\" KEY_BASE " /f /a", &r); ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); - run_reg_exe("reg copy HKEY_CURRENT_USER\\" KEY_BASE " HKEY_CURRENT_USER\\" COPY_DEST " /f /a", &r); + run_reg_exe("reg copy HKCU\\" COPY_SRC " HKCU\\", &r); ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); - run_reg_exe("reg copy HKEY_CURRENT_USER\\" KEY_BASE " HKEY_CURRENT_USER\\" KEY_BASE, &r); + /* Source and destination keys are the same */ + run_reg_exe("reg copy HKCU\\" COPY_SRC " HKCU\\" COPY_SRC, &r); ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); - run_reg_exe("reg copy HKEY_CURRENT_USER\\" KEY_BASE " HKEY_CURRENT_USER\\" KEY_BASE " /f", &r); + run_reg_exe("reg copy HKCU\\" COPY_SRC " HKCU\\" COPY_SRC " /f", &r); ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); - run_reg_exe("reg copy HKEY_CURRENT_USER\\" KEY_BASE " HKEY_CURRENT_USER\\" KEY_BASE " /s /f", &r); + run_reg_exe("reg copy HKCU\\" COPY_SRC " HKCU\\" COPY_SRC " /s /f", &r); ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); } @@ -106,5 +104,5 @@ START_TEST(copy) return; } - test_copy(); + test_command_syntax(); } diff --git a/sdk/tools/winesync/reg.cfg b/sdk/tools/winesync/reg.cfg index 09d6e269b34..7a1a3cce2db 100644 --- a/sdk/tools/winesync/reg.cfg +++ b/sdk/tools/winesync/reg.cfg @@ -4,4 +4,4 @@ directories: files: programs/reg/resource.h: base/applications/cmdutils/reg/resource.h tags: - wine: 33cfc644a055a9bc88253ae8d8c824ad603e7a02 + wine: 1ce21dbb5f2eed468c3748a2de1f25744e10e04c
2 years, 6 months
1
0
0
0
[reactos] 89/158: [WINESYNC] reg: Don't enumerate a registry key for subkeys if we know the key does not have subkeys.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=d9ac771683e9e4717c063…
commit d9ac771683e9e4717c0631617a912b96504780cc Author: winesync <ros-dev(a)reactos.org> AuthorDate: Sun Jan 16 21:15:48 2022 +0100 Commit: Thomas Csovcsity <thc.fr13nd(a)gmail.com> CommitDate: Sun Jun 19 13:06:34 2022 +0200 [WINESYNC] reg: Don't enumerate a registry key for subkeys if we know the key does not have subkeys. Signed-off-by: Hugh McMaster <hugh.mcmaster(a)outlook.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id 33cfc644a055a9bc88253ae8d8c824ad603e7a02 by Hugh McMaster <hugh.mcmaster(a)outlook.com> --- base/applications/cmdutils/reg/query.c | 9 ++++++--- sdk/tools/winesync/reg.cfg | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/base/applications/cmdutils/reg/query.c b/base/applications/cmdutils/reg/query.c index 66e54548688..7e42719faf9 100644 --- a/base/applications/cmdutils/reg/query.c +++ b/base/applications/cmdutils/reg/query.c @@ -213,7 +213,7 @@ static int query_value(HKEY hkey, WCHAR *value_name, WCHAR *path, BOOL recurse) static int query_all(HKEY hkey, WCHAR *path, BOOL recurse, BOOL recursing) { LONG rc; - DWORD num_values; + DWORD num_subkeys, num_values; DWORD max_value_len = 256, value_len; DWORD max_data_bytes = 2048, data_size; DWORD subkey_len; @@ -222,8 +222,8 @@ static int query_all(HKEY hkey, WCHAR *path, BOOL recurse, BOOL recursing) BYTE *data; HKEY subkey; - rc = RegQueryInfoKeyW(hkey, NULL, NULL, NULL, NULL, NULL, NULL, - &num_values, NULL, NULL, NULL, NULL); + rc = RegQueryInfoKeyW(hkey, NULL, NULL, NULL, &num_subkeys, NULL, + NULL, &num_values, NULL, NULL, NULL, NULL); if (rc) return 1; if (num_values || recursing) @@ -265,6 +265,9 @@ static int query_all(HKEY hkey, WCHAR *path, BOOL recurse, BOOL recursing) if (i || recursing) output_string(newlineW); + if (!num_subkeys) + return 0; + subkey_name = malloc(MAX_SUBKEY_LEN * sizeof(WCHAR)); path_len = lstrlenW(path); diff --git a/sdk/tools/winesync/reg.cfg b/sdk/tools/winesync/reg.cfg index bc02cb30a1e..09d6e269b34 100644 --- a/sdk/tools/winesync/reg.cfg +++ b/sdk/tools/winesync/reg.cfg @@ -4,4 +4,4 @@ directories: files: programs/reg/resource.h: base/applications/cmdutils/reg/resource.h tags: - wine: 35ccb87a767394ea3054c8890ad7b245e431290d + wine: 33cfc644a055a9bc88253ae8d8c824ad603e7a02
2 years, 6 months
1
0
0
0
← Newer
1
...
7
8
9
10
11
12
13
...
24
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Results per page:
10
25
50
100
200