1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- 'use strict';
- var tape = require('tape');
- var path = require('../');
- var pwd = process.cwd();
- tape('path.join zero-length', function (t) {
-
-
- t.strictEqual(path.posix.join(''), '.');
- t.strictEqual(path.posix.join('', ''), '.');
- if (path.win32) t.strictEqual(path.win32.join(''), '.');
- if (path.win32) t.strictEqual(path.win32.join('', ''), '.');
- t.strictEqual(path.join(pwd), pwd);
- t.strictEqual(path.join(pwd, ''), pwd);
- t.end();
- });
- tape('path.normalize zero-length', function (t) {
-
- t.strictEqual(path.posix.normalize(''), '.');
- if (path.win32) t.strictEqual(path.win32.normalize(''), '.');
- t.strictEqual(path.normalize(pwd), pwd);
- t.end();
- });
- tape('path.isAbsolute zero-length', function (t) {
-
- t.strictEqual(path.posix.isAbsolute(''), false);
- if (path.win32) t.strictEqual(path.win32.isAbsolute(''), false);
- t.end();
- });
- tape('path.resolve zero-length', function (t) {
-
-
- t.strictEqual(path.resolve(''), pwd);
- t.strictEqual(path.resolve('', ''), pwd);
- t.end();
- });
- tape('path.relative zero-length', function (t) {
-
- t.strictEqual(path.relative('', pwd), '');
- t.strictEqual(path.relative(pwd, ''), '');
- t.strictEqual(path.relative(pwd, pwd), '');
- t.end();
- });
|