From: Dmitry Volyntsev Date: Wed, 22 Dec 2021 17:22:14 +0000 (+0000) Subject: Tests: fixed fs/methods.t.ts on RHEL8. X-Git-Tag: 0.7.1~12 X-Git-Url: http://www.kaiwu.me/postgresql/commit/?a=commitdiff_plain;h=a56de006eb9d5651cc5a0492070cedaad0345309;p=njs.git Tests: fixed fs/methods.t.ts on RHEL8. --- diff --git a/test/fs/methods.t.js b/test/fs/methods.t.js index 64aa809b..849e77c2 100644 --- a/test/fs/methods.t.js +++ b/test/fs/methods.t.js @@ -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); } }, ];