From ca91387a601bbdbc1fca31b0291fd77d52a5c22b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BD=97=E6=B3=BD=E8=BD=A9?= Date: Sun, 26 Apr 2020 10:43:08 +0800 Subject: [PATCH] test: fix regex usage in some cases (#1504) --- t/node/route-domain-with-local-dns.t | 4 ++-- t/plugin/jwt-auth.t | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/t/node/route-domain-with-local-dns.t b/t/node/route-domain-with-local-dns.t index 45050b05baf3..d913c1d63d70 100644 --- a/t/node/route-domain-with-local-dns.t +++ b/t/node/route-domain-with-local-dns.t @@ -62,7 +62,7 @@ GET /t --- response_body passed --- error_log eval -/.*parse_args(): dns resolver\[.+\]/ +qr/.*parse_args\(\): dns resolver\[.+\]/ --- no_error_log [error] @@ -75,7 +75,7 @@ GET /not_found --- response_body {"error_msg":"failed to match any routes"} --- error_log eval -/.*parse_args(): dns resolver\[.+\]/ +qr/.*parse_args\(\): dns resolver\[.+\]/ --- no_error_log [error] diff --git a/t/plugin/jwt-auth.t b/t/plugin/jwt-auth.t index cad7d3abd188..c9401358c6ac 100644 --- a/t/plugin/jwt-auth.t +++ b/t/plugin/jwt-auth.t @@ -42,7 +42,7 @@ __DATA__ --- request GET /t --- response_body_like eval -qr/{"algorithm":"HS256","secret":"^[a-zA-Z0-9+/]+={0,2}$","exp":86400}/ +qr/{"algorithm":"HS256","secret":"[a-zA-Z0-9+\\\/]+={0,2}","exp":86400}/ --- no_error_log [error]