mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 02:35:49 +00:00
feature(operation) add support of unpacking bzip2 archives: .bz2, .tar.bz2, .tbz2
This commit is contained in:
parent
4f61036847
commit
9641415a00
5 changed files with 59 additions and 12 deletions
31
test/client/modules/operation/remove-extension.js
Normal file
31
test/client/modules/operation/remove-extension.js
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
'use strict';
|
||||
|
||||
const test = require('tape');
|
||||
const dir = '../../../../client/modules/operation';
|
||||
|
||||
const removeExtension = require(`${dir}/remove-extension`);
|
||||
|
||||
test('cloudcmd: client: modules: operation: removeExtension: .tar.gz', (t) => {
|
||||
const name = 'hello';
|
||||
const fullName = `${name}.tar.gz`;
|
||||
|
||||
t.equal(removeExtension(fullName), name, 'should remove .tar.gz');
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('cloudcmd: client: modules: operation: removeExtension: .tar.bz2', (t) => {
|
||||
const name = 'hello';
|
||||
const fullName = `${name}.tar.bz2`;
|
||||
|
||||
t.equal(removeExtension(fullName), name, 'should remove .tar.bz2');
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('cloudcmd: client: modules: operation: removeExtension: .bz2', (t) => {
|
||||
const name = 'hello';
|
||||
const fullName = `${name}.bz2`;
|
||||
|
||||
t.equal(removeExtension(fullName), name, 'should remove .bz2');
|
||||
t.end();
|
||||
});
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue