30 Star 207 Fork 28

快编程 / axe.store

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
test_bottle.gua 2.05 KB
一键复制 编辑 原始数据 按行查看 历史
dudu_axe 提交于 2022-06-22 20:10 . axe.store 2.0.0
con importBottle = import("bottle")
con importUtil = import("util")
con importPath = import("path")
con call = importUtil.call
con prepare = importBottle.prepare
con get = importBottle.get
con ensure = importUtil.ensure
con testMacosVersion = function() {
var a = importBottle.macosVersion()
var e = '10.15.5'
ensure(a == e, a)
}
con testMacosName = function() {
var a = importBottle.macosName()
var e = 'catalina'
ensure(a == e, a)
}
con testParsedSb = function() {
log(importBottle.parsedSb())
}
con testDownload = function() {
prepare()
var name = 'openssl@1.1'
importBottle.download(name)
importBottle.tar(name)
}
con testOpenssl = function() {
prepare()
var name = 'openssl@1.1'
get(name)
var b = importPath.pathBottleBin()
var c = '{}/openssl version'.format(b)
var r = call(c)
ensure(r == 'OpenSSL 1.1.1g 21 Apr 2020\n', r)
}
con testWget = function() {
prepare()
var name = 'wget'
get(name)
var b = importPath.pathBottleBin()
var c = '{}/wget --version'.format(b)
var r = call(c)
ensure(r.has('Wget'), r)
}
con testTree = function() {
prepare()
var name = 'tree'
get(name)
var b = importPath.pathBottleBin()
var c = '{}/tree --version'.format(b)
var r = call(c)
ensure(r.has('tree'), r)
}
con testPython = function() {
prepare()
var name = 'python@3.8'
get(name)
var b = importPath.pathBottleBin()
var c = '{}/python3 --version'.format(b)
var r = call(c)
ensure(r.has('Python'), r)
}
con test7z = function() {
prepare()
var name = 'p7zip'
get(name)
var b = importPath.pathBottleBin()
var c = '{}/7z --help'.format(b)
var r = call(c)
ensure(r.has('7-Zip'), r)
}
con testPercol = function() {
prepare()
var name = 'percol'
get(name)
var b = importPath.pathBottleBin()
var c = '{}/percol --version'.format(b)
var r = call(c)
ensure(r.has('percol'), r)
}
con tests = function() {
testOpenssl()
testWget()
testTree()
testPython()
test7z()
testPercol()
}
tests()
1
https://gitee.com/kuaibiancheng/store.git
git@gitee.com:kuaibiancheng/store.git
kuaibiancheng
store
axe.store
master

搜索帮助