(t *testing.T)
| 21 | } |
| 22 | |
| 23 | func TestSymlinkInstall(t *testing.T) { |
| 24 | if !symlinksWork(t) { |
| 25 | t.Skip("symlinks unavailable on this platform/session") |
| 26 | } |
| 27 | ctx := context.Background() |
| 28 | s := newTestStore(t) |
| 29 | in, err := s.Create(ctx, "Sym", "", "body\n") |
| 30 | if err != nil { |
| 31 | t.Fatalf("Create: %v", err) |
| 32 | } |
| 33 | ins, err := s.Install(ctx, in.ID, "claude", "user", "") |
| 34 | if err != nil { |
| 35 | t.Fatalf("Install: %v", err) |
| 36 | } |
| 37 | if ins.LinkKind != "symlink" { |
| 38 | t.Fatalf("expected symlink, got %s", ins.LinkKind) |
| 39 | } |
| 40 | resolved, err := os.Readlink(ins.TargetPath) |
| 41 | if err != nil { |
| 42 | t.Fatalf("Readlink: %v", err) |
| 43 | } |
| 44 | if filepath.Clean(resolved) != filepath.Clean(managedFilePath("Sym")) { |
| 45 | t.Fatalf("symlink points at %s, want %s", resolved, managedFilePath("Sym")) |
| 46 | } |
| 47 | } |
| 48 | |
| 49 | func TestCopyFallback(t *testing.T) { |
| 50 | ctx := context.Background() |
nothing calls this directly
no test coverage detected