[njs] Tests: fixed fs/methods.t.ts on RHEL8.

Dmitry Volyntsev xeioex at nginx.com
Wed Dec 22 17:22:56 UTC 2021


details:   https://hg.nginx.org/njs/rev/82518ae9f209
branches:  
changeset: 1778:82518ae9f209
user:      Dmitry Volyntsev <xeioex at nginx.com>
date:      Wed Dec 22 17:22:14 2021 +0000
description:
Tests: fixed fs/methods.t.ts on RHEL8.

diffstat:

 test/fs/methods.t.js |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (21 lines):

diff -r 8843d18bee30 -r 82518ae9f209 test/fs/methods.t.js
--- a/test/fs/methods.t.js	Wed Dec 22 16:54:27 2021 +0000
+++ b/test/fs/methods.t.js	Wed Dec 22 17:22:14 2021 +0000
@@ -135,7 +135,7 @@ let read_tests = () => [
 
           return data.compare(params.expected) == 0;
       } },
-    { args: ["/proc/cpuinfo"], slice:[0,9], expected: Buffer.from("processor"),
+    { args: ["/proc/cpuinfo"],
       check: (data, params) => {
 
           if (data.error) {
@@ -147,7 +147,7 @@ let read_tests = () => [
               return true;
           }
 
-          return data.compare(params.expected) == 0;
+          return /processor/.test(data);
       } },
 ];
 


More information about the nginx-devel mailing list