Files
cocos4/test/qunit/unit-es5/test-path.js
T
2018-01-18 17:21:13 +08:00

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');
});