Browse files

Change connectError test code, because on my openSUSE error message is:

Access denied for user ''@'localhost' to database 'mysql'
  • Loading branch information...
1 parent 69d9d34 commit ff9cb8c5e2f93010b5fb50a4335b1dade3c8121a @Sannis committed Aug 16, 2010
Showing with 2 additions and 2 deletions.
  1. +2 −2 tests/test-class-mysqlconn.js
View
4 tests/test-class-mysqlconn.js
@@ -103,8 +103,8 @@ exports.ConnectError = function (test) {
conn.connect(cfg.host, cfg.user, cfg.password, cfg.database_denied);
error_str = conn.connectError();
-
- if (error_str.match(new RegExp("Access denied for user '" + cfg.user + "'\@'.*' to database \'" + cfg.database_denied + "\'"))) {
+
+ if (error_str.match(new RegExp("Access denied for user '(" + cfg.user + "|)'\@'.*' to database \'" + cfg.database_denied + "\'"))) {
test.ok(true, "conn.connectError()");
} else {
test.ok(false, "conn.connectError()");

0 comments on commit ff9cb8c

Please sign in to comment.