跳到主要内容

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

浏览文件

linked_windows_test.go

24 行 · 536 B历史下载
1package gitguard
2
3import (
4 "os"
5 "path/filepath"
6 "testing"
7)
8
9func TestWindowsMetadataHardLinkIsDetected(t *testing.T) {
10 dir := t.TempDir()
11 config := filepath.Join(dir, "config")
12 if err := os.WriteFile(config, []byte("metadata"), 0600); err != nil {
13 t.Fatal(err)
14 }
15 if linked(config) {
16 t.Fatal("single link reported as shared metadata")
17 }
18 if err := os.Link(config, filepath.Join(dir, "editable-alias")); err != nil {
19 t.Fatal(err)
20 }
21 if !linked(config) {
22 t.Fatal("writable NTFS alias of metadata was not detected")
23 }
24}