]> git.kaiwu.me - njs.git/commitdiff
Tests: fixed fs/methods.t.ts on RHEL8.
authorDmitry Volyntsev <xeioex@nginx.com>
Wed, 22 Dec 2021 17:22:14 +0000 (17:22 +0000)
committerDmitry Volyntsev <xeioex@nginx.com>
Wed, 22 Dec 2021 17:22:14 +0000 (17:22 +0000)
test/fs/methods.t.js

index 64aa809b92976067dd87e588f098624223512f5e..849e77c2011f1d3c401fb580c70c16e09281a99a 100644 (file)
@@ -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);
       } },
 ];