mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-21 16:12:40 +08:00
13 lines
506 B
JavaScript
13 lines
506 B
JavaScript
module('cc.path', SetupEngine);
|
|
|
|
test('dirname', function () {
|
|
|
|
ok(cc.path.dirname('aa/bb/cc') === 'aa/bb', 'get success');
|
|
ok(cc.path.dirname('aa/bb/cc.png') === 'aa/bb', 'get success');
|
|
ok(cc.path.dirname('aa/bb/cc/') === 'aa/bb/cc', 'get success');
|
|
ok(cc.path.dirname('aa/bb/cc.png/ee.png') === 'aa/bb/cc.png', 'get success');
|
|
ok(cc.path.dirname('D:\\aa\\bb') === 'D:\\aa', 'get success');
|
|
ok(cc.path.dirname('aa/bb/.github/.gitignore') === 'aa/bb/.github', 'get success');
|
|
|
|
});
|