MCPcopy Index your code
hub / github.com/GopeedLab/gopeed / TestScript_ExecuteScriptAtPath_EmptyPath

Function TestScript_ExecuteScriptAtPath_EmptyPath

pkg/download/script_test.go:98–113  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

96}
97
98func TestScript_ExecuteScriptAtPath_EmptyPath(t *testing.T) {
99 setupScriptTest(t, func(downloader *Downloader) {
100 data := &ScriptData{
101 Event: ScriptEventDownloadDone,
102 Time: time.Now().UnixMilli(),
103 }
104
105 err := downloader.executeScriptAtPath("", data)
106 if err == nil {
107 t.Error("Expected error for empty path")
108 }
109 if err.Error() != "script path is empty" {
110 t.Errorf("Expected 'script path is empty' error, got: %v", err)
111 }
112 })
113}
114
115func TestScript_ExecuteScriptAtPath_NonExistentFile(t *testing.T) {
116 setupScriptTest(t, func(downloader *Downloader) {

Callers

nothing calls this directly

Calls 3

setupScriptTestFunction · 0.85
executeScriptAtPathMethod · 0.80
ErrorMethod · 0.45

Tested by

no test coverage detected