diff lib/Test/Nginx.pm @ 1896:8b74936ff2ac

Tests: added has_feature() test for CryptX.
author Sergey Kandaurov <pluknet@nginx.com>
date Mon, 29 May 2023 17:04:36 +0400
parents 0e1865aa9b33
children 07656d303199
line wrap: on
line diff
--- a/lib/Test/Nginx.pm
+++ b/lib/Test/Nginx.pm
@@ -288,6 +288,13 @@ sub has_feature($) {
 		return 1;
 	}
 
+	if ($feature eq 'cryptx') {
+		eval { require Crypt::Misc; };
+		return 0 if $@;
+		eval { die if $Crypt::Misc::VERSION < 0.067; };
+		return !$@;
+	}
+
 	return 0;
 }