1
0
Code Issues Pull Requests Packages Projects Releases Wiki Activity GitHub Gitee

实现快捷键循环切换 Windows / Unix 风格

This commit is contained in:
2024-12-14 22:12:58 +08:00
parent 6fce88f88a
commit 2a1cf5488d
7 changed files with 160 additions and 12 deletions

View File

@@ -57,7 +57,7 @@ suite('Extension Test: run variable convert test case', () => {
assert.strictEqual(correctValue, currentValue);
}
// 验证转换
for (let eol of eolList) {
for (const eol of eolList) {
assert.strictEqual(testCase.output.camelCase, caseConversion(SupportVariableCase.CAMEL_CASE, input, eol), 'camel case test failed.');
assert.strictEqual(testCase.output.pascalCase, caseConversion(SupportVariableCase.PASCAL_CASE, input, eol), 'pascal case test failed.');
@@ -113,11 +113,14 @@ suite('Extension Test: run path convert test case', () => {
// }
test(testTitle + ' - ' + testCase.title, () => {
const inputList = Array.isArray(testCase.input) ? testCase.input : [testCase.input];
const eolList = Array.isArray(testCase.eol) ? testCase.eol : [testCase.eol];
for (const input of inputList) {
// console.log('input', '->' + input + '<-');
// 验证转换
assert.strictEqual(testCase.output.Windows.unEscape, pathConversion(SupportPathFormat.Windows, input), 'Windows path format test failed.');
assert.strictEqual(testCase.output.Unix.unEscape, pathConversion(SupportPathFormat.Unix, input), 'Unix path format test failed.');
for (const eol of eolList) {
assert.strictEqual(testCase.output.Windows.unEscape, pathConversion(SupportPathFormat.Windows, input, eol), 'Windows path format test failed.');
assert.strictEqual(testCase.output.Unix.unEscape, pathConversion(SupportPathFormat.Unix, input, eol), 'Unix path format test failed.');
}
}
});
}