1/* 2* Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. 3* Licensed under the Apache License, Version 2.0 (the "License"); 4* you may not use this file except in compliance with the License. 5* You may obtain a copy of the License at 6* 7* http://www.apache.org/licenses/LICENSE-2.0 8* 9* Unless required by applicable law or agreed to in writing, software 10* distributed under the License is distributed on an "AS IS" BASIS, 11* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12* See the License for the specific language governing permissions and 13* limitations under the License. 14*/ 15 16import * as assert from 'assert'; 17 18// You can import and use all API from the 'vscode' module 19// as well as import your extension to test it 20import * as vscode from 'vscode'; 21import { 22 getGenerateConf, 23 getLogPath,getLogName 24} from '../../../common/conf'; 25 26// import * as myExtension from '../../extension'; 27 28suite('Common_Conf_Test_Suite', () => { 29 vscode.window.showInformationMessage('Start all tests.'); 30 31 //1, 测试getGenerateConf 32 test('getGenerateConf_test_1', () => { 33 let genType = getGenerateConf(); 34 assert.strictEqual(genType, 1); 35 }); 36 37 //1, 测试getLogPath 38 test('getLogPath_test_1', () => { 39 let logPath = getLogPath(); 40 assert.strictEqual(logPath, './'); 41 }); 42 43 //1, 测试getLogName 44 test('getLogName_test_1', () => { 45 let logName = getLogName(); 46 assert.strictEqual(logName, 'dmesg.log'); 47 }); 48 49}); 50