Fixed a typo and added a unit test for mismatched quotes.
// algorithm parsing other parameters requires that there are no whitespaces
// within the parameter values.
dba.erase(password_pos, password_prefix.length() + password.length() + 2);
- // Leaing or trailing whitespace may remain after the password removal.
+ // Leading or trailing whitespace may remain after the password removal.
dba = util::str::trim(dba);
// If the password was the only parameter in the access string, there is
// nothing more to do.
invalid = " noequalshere ";
EXPECT_THROW(DatabaseConnection::parse(invalid), isc::InvalidParameter);
+ // Mismatched single quote.
+ invalid = "password='xyz";
+ EXPECT_THROW(DatabaseConnection::parse(invalid), isc::InvalidParameter);
+
// A single "=" is valid string, but is placed here as the result is
// expected to be nothing.
invalid = "=";