added github workflow

This commit is contained in:
aomizu
2025-06-04 11:19:44 +09:00
parent 48146b3bee
commit 3a2d10b17b
4 changed files with 96 additions and 0 deletions

25
pkg/utils/utils_test.go Normal file
View File

@@ -0,0 +1,25 @@
package utils
import (
"os"
"path/filepath"
"testing"
)
func TestPathExists(t *testing.T) {
// Test with a path that should exist (current directory)
currentDir, err := os.Getwd()
if err != nil {
t.Fatalf("Failed to get current directory: %v", err)
}
if !PathExists(currentDir) {
t.Errorf("PathExists(%s) = false, want true", currentDir)
}
// Test with a path that should not exist
nonExistentPath := filepath.Join(currentDir, "this-path-should-not-exist-12345")
if PathExists(nonExistentPath) {
t.Errorf("PathExists(%s) = true, want false", nonExistentPath)
}
}