跳到主要内容

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

浏览文件

client_integration_darwin_test.go

40 行 · 682 B历史下载
1package sftp
2
3import (
4 "syscall"
5 "testing"
6)
7
8func TestClientStatVFS(t *testing.T) {
9 if *testServerImpl {
10 t.Skipf("go server does not support FXP_EXTENDED")
11 }
12 sftp, cmd := testClient(t, READWRITE, NODELAY)
13 defer cmd.Wait()
14 defer sftp.Close()
15
16 vfs, err := sftp.StatVFS("/")
17 if err != nil {
18 t.Fatal(err)
19 }
20
21 // get system stats
22 s := syscall.Statfs_t{}
23 err = syscall.Statfs("/", &s)
24 if err != nil {
25 t.Fatal(err)
26 }
27
28 // check some stats
29 if vfs.Files != uint64(s.Files) {
30 t.Fatal("fr_size does not match")
31 }
32
33 if vfs.Bfree != uint64(s.Bfree) {
34 t.Fatal("f_bsize does not match")
35 }
36
37 if vfs.Favail != uint64(s.Ffree) {
38 t.Fatal("f_namemax does not match")
39 }
40}