From 76bc721ac11e95462d522c34b27428be1a5037d3 Mon Sep 17 00:00:00 2001 From: jaywcjlove <398188662@qq.com> Date: Wed, 27 Jun 2018 21:19:28 +0800 Subject: [PATCH] Update test case. --- test/index.js | 27 +++++++++++++++++++++++++-- test/test.sh | 0 2 files changed, 25 insertions(+), 2 deletions(-) create mode 100755 test/test.sh diff --git a/test/index.js b/test/index.js index 13c335a..ebe170d 100644 --- a/test/index.js +++ b/test/index.js @@ -1,4 +1,5 @@ -const { readdir, readdirAsync, uidToName, getStat } = require('../'); +const { readdir, readdirAsync, uidToName, getStat, chmod } = require('../'); +const path = require('path'); readdir('/').then((files) => { files.map((Stats) => { @@ -17,4 +18,26 @@ readdirAsync('/var').then((files) => { uidToName().then((names) => { console.log('names:', names); -}) \ No newline at end of file +}) + +const file = path.join(__dirname, 'test.sh'); + +chmod(file, 777); + +chmod(file, { + owner: { + read: true, + write: true, + execute: true + }, + group: { + read: true, + write: true, + execute: true + }, + others: { + read: true, + write: true, + execute: true + } +}); \ No newline at end of file diff --git a/test/test.sh b/test/test.sh new file mode 100755 index 0000000..e69de29