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