changeset 1778:82518ae9f209

Tests: fixed fs/methods.t.ts on RHEL8.
author Dmitry Volyntsev <xeioex@nginx.com>
date Wed, 22 Dec 2021 17:22:14 +0000
parents 8843d18bee30
children 9e1fd062a1d8
files test/fs/methods.t.js
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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 @@
 
           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 @@
               return true;
           }
 
-          return data.compare(params.expected) == 0;
+          return /processor/.test(data);
       } },
 ];