/validate/main.js
//安裝檔案確認
const readfile =
require
('../common/readfile'
)//讀取目錄路徑下檔案的函式
const path =
require
('path');
const installpath = path.
resolve
('../../');
//被對比目錄路徑
const contrastarr =
require
('../conf/contrastfilename'
)//對比檔案
const contrastfilefun =
require
('../common/contrastfile'
)//檔案比較函式
//系統配置檔案確認
const confpath =
'../conf/config.ini'
//被對比檔案路徑
const readfilelinetoarr =
require
('../common/readfilelinetoarr'
)const config =
require
('../conf/contrastconf'
)//對比檔案
// 登錄檔資訊新增
const mytest =
require
('../common/readcmd');
const registerpath =
'hkey_local_machine\\software\\microsoft\\windows\\currentversion\\uninstall\\myco'
;const opertionadd =
'echo y| reg add '
;//預設確認
const operaddinfoarr =
[' /v data8 /t reg_binary /d fe3499'
,' /v data9 /t reg_binary /d fe3499'];
//登錄檔資訊查詢
const opertionquery =
'reg query '
const operqueryinfoarr =
[' /v data111'
,' /v data10'
]//安裝檔案確認
letp1
=new
promise
(function
(resolve, reject)`)
;}else})
//系統配置檔案確認
letp2
=new
promise
(function
(resolve, reject)`)
;}else})
})// 登錄檔資訊新增
letp3
=new
promise
(function
(resolve, reject)`,
function
(code, err, data)
else})
}for
(var i =
0; i < operaddinfoarr.length; i++))
;})(i)})
} actions.
push
(action()
)}promise.
all(actions)
.then((
)=>
resolve
(queryresults);}
)})promise.
all([p1
,p2,p3
,p4])
.then
(function
(results)
)
/common
module.
exports
=function
(contrastarr,fileslist)})
;return lackfiles;
}var exec =
require
("child_process"
).exec;
const iconv =
require
('iconv-lite');
module.
exports
=function
mytest
(path,callback)
,function
(err, stdout, stderr)
else
if(stderr.lenght >0)
else})
;});
};const fs =
require
('fs');
module.exports.fileslist =
module.exports.
getfiles
=function
(confirmpath)
else})
return module.exports.fileslist;
}const fs =
require
("fs");
const readline =
require
("readline");
module.
exports
=function
readfiletoarr
(freadname,cb));
readobj.on(
'line'
,function
(line)})
; readobj.on(
'close'
,function()
);}
Node軟體的安裝
1.官網 左邊被推薦,右邊最新 2.window r開啟命令列,進入安裝目錄,或者shift 滑鼠右鍵,點選在此開啟命令列,直接進入安裝目錄,輸入npm install express 回車 等待安裝元件 使用node v出現版本號即安裝成功 2.安裝webstrom,一鍵安裝,這裡就不在解釋了 3...
如何確認軟體測試結束的呢?
在軟體消亡之前,如果沒有測試的結束點,那麼軟體測試就永無休止,永遠不可能結束。軟體測試的結束點,要依據自己公司具體情況來制定,不能一概而論 個人認為測試結束點由以下幾個條件決定 1.基於 測試階段 的原則 每個軟體的測試一般都要經過單元測試 整合測試 系統測試這幾個階段,我們可以分別對單元測試 整合...
如何確認軟體測試結束的呢?
在軟體消亡之前,如果沒有測試的結束點,那麼軟體測試就永無休止,永遠不可能結束。軟體測試的結束點,要依據自己公司具體情況來制定,不能一概而論 個人認為測試結束點由以下幾個條件決定 1.基於 測試階段 的原則 每個軟體的測試一般都要經過單元測試 整合測試 系統測試這幾個階段,我們可以分別對單元測試 整合...