跳到主要内容

Claude Cage · 面向 Claude 的隔离开发环境,支持桌面工作台、多账号、远程部署与移动端连接。上游 Lee-xeo/Claude-Cage 完整源码镜像,非灵栈原创;主许可 MIT,第三方组件遵循各自许可。来源:https://github.com/Lee-xeo/Claude-Cage 。手动同步,不附带 Release 安装包。

浏览文件

setup_script_test.go

33 行 · 725 B历史下载
1package agentvm
2
3import (
4 "os/exec"
5 "runtime"
6 "testing"
7)
8
9// tests/setup-script.sh: the setup script's blocks, run against stubs.
10func TestSetupScript(t *testing.T) {
11 runScript(t, "tests/setup-script.sh")
12}
13
14// tests/installer.sh: the curl installer and agent-vm.sh, against stub
15// releases and a stub clone.
16func TestInstaller(t *testing.T) {
17 runScript(t, "tests/installer.sh")
18}
19
20func runScript(t *testing.T, script string) {
21 t.Helper()
22 if runtime.GOOS == "windows" {
23 t.Skip("runs in a Linux guest, or on macOS and Linux")
24 }
25 bash, err := exec.LookPath("bash")
26 if err != nil {
27 t.Skip("no bash")
28 }
29 out, err := exec.Command(bash, script).CombinedOutput()
30 if err != nil {
31 t.Errorf("%v\n%s", err, out)
32 }
33}