File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -85,6 +85,28 @@ Feature: Manage WordPress users
8585 """
8686 And the return code should be 1
8787
88+ When I run `wp user create testuser3b testuser3b@example.com --user_pass="test\" user3b's\p ass\! " `
89+ Then STDOUT should not contain:
90+ """
91+ Password:
92+ """
93+
94+ # Check password without the `--escape-chars` option.
95+ When I try `wp user check-password testuser3b "test\" user3b's\p ass\! " `
96+ Then STDERR should be:
97+ """
98+ Warning: Password contains characters that need to be escaped. Please escape them manually or use the `--escape-chars` option.
99+ """
100+ And the return code should be 1
101+
102+ # Check password with the `--escape-chars` option.
103+ When I try `wp user check-password testuser3b "test\" user3b's\p ass\! " --escape-chars`
104+ Then the return code should be 0
105+
106+ # Check password with manually escaped characters.
107+ When I try `wp user check-password testuser3b "test\\\" user3b\' s\\\p ass\\\! " `
108+ Then the return code should be 0
109+
88110 Scenario : Reassigning user posts
89111 Given a WP multisite install
90112
You can’t perform that action at this time.
0 commit comments