tangweijie 5099f2e87e Initial commit: Vue3 + TypeScript 前端项目
- Vue 3 + TypeScript + Element Plus 前端界面
- Pinia 状态管理
- Vue Router 4 路由管理
- Axios HTTP 客户端
- MSW (Mock Service Worker) 开发环境模拟
- 账户管理界面 (列表、详情、三科目余额展示)
- 交易管理界面 (列表、详情)
- 对账管理界面 (三账校验)
- 完善的 API 客户端封装
- Docker 容器化配置
- Nginx 配置用于生产环境
2026-01-05 17:57:11 +08:00

59 lines
2.7 KiB
JavaScript

'use strict';
var tape = require('tape');
var path = require('../');
tape('path.posix.dirname', function (t) {
t.strictEqual(path.posix.dirname('/a/b/'), '/a');
t.strictEqual(path.posix.dirname('/a/b'), '/a');
t.strictEqual(path.posix.dirname('/a'), '/');
t.strictEqual(path.posix.dirname(''), '.');
t.strictEqual(path.posix.dirname('/'), '/');
t.strictEqual(path.posix.dirname('////'), '/');
t.strictEqual(path.posix.dirname('//a'), '//');
t.strictEqual(path.posix.dirname('foo'), '.');
t.end();
});
tape('path.win32.dirname', { skip: true }, function (t) {
t.strictEqual(path.win32.dirname('c:\\'), 'c:\\');
t.strictEqual(path.win32.dirname('c:\\foo'), 'c:\\');
t.strictEqual(path.win32.dirname('c:\\foo\\'), 'c:\\');
t.strictEqual(path.win32.dirname('c:\\foo\\bar'), 'c:\\foo');
t.strictEqual(path.win32.dirname('c:\\foo\\bar\\'), 'c:\\foo');
t.strictEqual(path.win32.dirname('c:\\foo\\bar\\baz'), 'c:\\foo\\bar');
t.strictEqual(path.win32.dirname('\\'), '\\');
t.strictEqual(path.win32.dirname('\\foo'), '\\');
t.strictEqual(path.win32.dirname('\\foo\\'), '\\');
t.strictEqual(path.win32.dirname('\\foo\\bar'), '\\foo');
t.strictEqual(path.win32.dirname('\\foo\\bar\\'), '\\foo');
t.strictEqual(path.win32.dirname('\\foo\\bar\\baz'), '\\foo\\bar');
t.strictEqual(path.win32.dirname('c:'), 'c:');
t.strictEqual(path.win32.dirname('c:foo'), 'c:');
t.strictEqual(path.win32.dirname('c:foo\\'), 'c:');
t.strictEqual(path.win32.dirname('c:foo\\bar'), 'c:foo');
t.strictEqual(path.win32.dirname('c:foo\\bar\\'), 'c:foo');
t.strictEqual(path.win32.dirname('c:foo\\bar\\baz'), 'c:foo\\bar');
t.strictEqual(path.win32.dirname('file:stream'), '.');
t.strictEqual(path.win32.dirname('dir\\file:stream'), 'dir');
t.strictEqual(path.win32.dirname('\\\\unc\\share'),
'\\\\unc\\share');
t.strictEqual(path.win32.dirname('\\\\unc\\share\\foo'),
'\\\\unc\\share\\');
t.strictEqual(path.win32.dirname('\\\\unc\\share\\foo\\'),
'\\\\unc\\share\\');
t.strictEqual(path.win32.dirname('\\\\unc\\share\\foo\\bar'),
'\\\\unc\\share\\foo');
t.strictEqual(path.win32.dirname('\\\\unc\\share\\foo\\bar\\'),
'\\\\unc\\share\\foo');
t.strictEqual(path.win32.dirname('\\\\unc\\share\\foo\\bar\\baz'),
'\\\\unc\\share\\foo\\bar');
t.strictEqual(path.win32.dirname('/a/b/'), '/a');
t.strictEqual(path.win32.dirname('/a/b'), '/a');
t.strictEqual(path.win32.dirname('/a'), '/');
t.strictEqual(path.win32.dirname(''), '.');
t.strictEqual(path.win32.dirname('/'), '/');
t.strictEqual(path.win32.dirname('////'), '/');
t.strictEqual(path.win32.dirname('foo'), '.');
t.end();
});