代码拉取完成,页面将自动刷新
const importCask = import("cask")
const importUtil = importUtil('util')
const ensure = importUtil.ensure
const testRedirectedUrl = function() {
var i = 'https://d1.music.126.net/dmusic/obj/w5zCg8OCw6fCn2vDicOl/680685466/242a/20191112165731/NeteaseMusic_2.3.2_832_web.dmg'
var a = importCask.redirectedUrl(i)
var e = 'https://d1.music.126.net/dmusic/obj/w5zCg8OCw6fCn2vDicOl/680685466/242a/20191112165731/NeteaseMusic_2.3.2_832_web.dmg'
ensure(a == e, a)
}
const testSuffixOfFile = function() {
var i = '/abc/efg/aaa.exe'
var a = importCask.suffixOfFile(i)
var e = '.exe'
ensure(a == e, a)
i = '/abc/efg/aaa.txt?abc=123'
a = importCask.suffixOfFile(i)
e = '.txt'
ensure(a == e, a)
}
const testDmg = function() {
importCask.installDmg('qqmusic', 'https://dldir1.qq.com/music/clntupate/mac/QQMusicMac_Mgr.dmg')
}
const testDmgPkg = function() {
importCask.installDmg('teamviewer', 'https://download.teamviewer.com/download/TeamViewer.dmg')
}
const testZip = function() {
importCask.installZip('1clipboard', 'http://1clipboard.io/download/darwin/0.1.8/1Clipboard.zip')
}
const testPkg = function() {
importCask.installPkg('qtspim', 'https://downloads.sourceforge.net/spimsimulator/QtSpim_9.1.21_mac.pkg')
}
const testTar = function() {
var tarBz2 = 'https://downloads.sourceforge.net/freecol/freecol-0.11.6-mac.tar.bz2'
importCask.installTar('freecol', tarBz2)
var tarGz = 'https://downloads.sourceforge.net/camprocessor/CAMEd-3.2.2-macosx-cocoa-x86_64.tar.gz'
importCask.installTar('camed', tarGz)
}
const tests = function() {
importCask.prepare()
// testRedirectedUrl()
// testSuffixOfFile()
// testDmg()
// testDmgPkg()
// testZip()
// testPkg()
testTar()
}
tests()
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。