提交 d13bbe59 编写于 作者: D Daniel Imms

Add test for parseBackupContent

上级 37ad5fa9
......@@ -18,6 +18,8 @@ import { BackupFileService, BackupFilesModel } from 'vs/workbench/services/backu
import { FileService } from 'vs/workbench/services/files/node/fileService';
import { EnvironmentService } from 'vs/platform/environment/node/environmentService';
import { parseArgs } from 'vs/platform/environment/node/argv';
import { TextModel } from 'vs/editor/common/model/textModel';
import { IRawTextContent } from 'vs/workbench/services/textfile/common/textfiles';
class TestEnvironmentService extends EnvironmentService {
......@@ -213,6 +215,19 @@ suite('BackupFileService', () => {
});
});
test('parseBackupContent', () => {
const rawTextContent: IRawTextContent = {
resource: null,
name: null,
mtime: null,
etag: null,
encoding: null,
value: TextModel.toRawText('metadata\ncontent', TextModel.DEFAULT_CREATION_OPTIONS),
valueLogicalHash: null
};
assert.equal(service.parseBackupContent(rawTextContent), 'content');
});
test('BackupFilesModel - simple', () => {
const model = new BackupFilesModel();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册