30 Star 207 Fork 29

快编程 / axe.store

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
test_json.gua 2.28 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 ensure = importUtil.ensure
con jq = importUtil.jq
con suffixPath = '/usr/local/axe/meta/gualang ./store.gua'
con test_version = function() {
var c = '{} {} --json'.format(suffixPath, 'version')
var r = call(c)
jq(r)
r = json.loads(r)
ensure(type(r) == type({}), r)
}
con test_sou_qq = function() {
var c = '{} {} {} --json'.format(suffixPath, 'sou', 'qq')
var r = call(c)
jq(r)
r = json.loads(r)
ensure(type(r) == type({}), r)
}
con test_sou_qq_cask = function() {
var c = '{} {} {} {} --json'.format(suffixPath, 'sou', 'qq', '--cask')
var r = call(c)
jq(r)
r = json.loads(r)
ensure(type(r) == type({}), r)
}
con test_sou_tree = function() {
var c = '{} {} {} --json'.format(suffixPath, 'sou', 'tree')
var r = call(c)
jq(r)
r = json.loads(r)
ensure(type(r) == type({}), r)
}
con test_sou_none = function() {
var c = '{} {} {} --json'.format(suffixPath, 'sou', 'none')
var r = call(c)
jq(r)
r = json.loads(r)
ensure(type(r) == type({}), r)
}
con test_get_none = function() {
var c = '{} {} {} {} --json'.format(suffixPath, 'get', 'none', '--cask')
var r = call(c)
jq(r)
r = json.loads(r)
ensure(type(r) == type({}), r)
}
con test_get_qqmusic = function() {
var c = '{} {} {} {} --json'.format(suffixPath, 'get',' qqmusic', '--cask')
var r = call(c)
jq(r)
r = json.loads(r)
ensure(type(r) == type({}), r)
}
con test_get_p7zip = function() {
var c = '{} {} {} {} --json'.format(suffixPath, 'get', 'p7zip', '--bottle')
var r = call(c)
jq(r)
r = json.loads(r)
ensure(type(r) == type({}), r)
}
con test_rm_qqmusic = function() {
var c = '{} {} {} --json'.format(suffixPath, 'rm', 'qqmusic')
var r = call(c)
jq(r)
r = json.loads(r)
ensure(type(r) == type({}), r)
}
con test_update_store = function() {
var c = '{} {} {} --json'.format(suffixPath, 'update', '')
var r = call(c)
jq(r)
r = json.loads(r)
ensure(type(r) == type({}), r)
}
con tests = function() {
test_sou_qq()
test_sou_tree()
test_sou_none()
test_sou_qq_cask()
test_rm_qqmusic()
test_update_store()
test_version()
}
tests()
1
https://gitee.com/kuaibiancheng/store.git
git@gitee.com:kuaibiancheng/store.git
kuaibiancheng
store
axe.store
master

搜索帮助