返回 DeepSeek-Reasonix
open_local_path_windows_test.go
根目录 / desktop / open_local_path_windows_test.go
1 //go:build windows
2
3 package main
4
5 import (
6 "strings"
7 "testing"
8 )
9
10 func TestNormalizeLocalOpenPathRejectsDriveLessWindowsFileURL(t *testing.T) {
11 for _, value := range []string{"file:///report.md", "file:///dir/report.md"} {
12 if got, err := normalizeLocalOpenPath(value); err == nil || !strings.Contains(err.Error(), "not absolute") {
13 t.Errorf("normalizeLocalOpenPath(%q) = (%q, %v), want not-absolute error", value, got, err)
14 }
15 }
16 }
17
17 lines GO