Documentation
¶
Overview ¶
Package testutil provides test helpers for setup-workflow tests.
Index ¶
- func Chdir(t *testing.T, dir string)
- func CreateClaudeDir(t *testing.T, projectDir string) string
- func CreateClaudeMD(t *testing.T, dir, content string) string
- func CreateDir(t *testing.T, base, name string) string
- func CreateFile(t *testing.T, dir, name, content string) string
- func InitGitRepo(t *testing.T, dir string) string
- func SampleAgentMD(name, description string) string
- func SampleClaudeMD() string
- func SampleClaudeMDFlutter() string
- func SampleClaudeMDGo() string
- func SampleClaudeMDJava() string
- func SampleCommandMD(description string) string
- func SampleConfigYAML() string
- func SampleProjectStateYAML() string
- func SampleSkillMD(description string) string
- func SetGitRemote(t *testing.T, dir, remoteURL string)
- func TempDir(t *testing.T) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Chdir ¶
Chdir changes the working directory for the duration of the test. The original directory is restored when the test completes.
func CreateClaudeDir ¶
CreateClaudeDir creates the .claude directory structure for testing.
func CreateClaudeMD ¶
CreateClaudeMD creates a CLAUDE.md file with the given content. If content is empty, creates a sample CLAUDE.md.
func CreateDir ¶
CreateDir creates a directory (including parents) in the specified base directory. Returns the full path to the created directory.
func CreateFile ¶
CreateFile creates a file with the given content in the specified directory. Returns the full path to the created file.
func InitGitRepo ¶
InitGitRepo initializes a git repository in the given directory. Returns the directory path for convenience.
func SampleAgentMD ¶
SampleAgentMD returns sample agent file content.
func SampleClaudeMD ¶
func SampleClaudeMD() string
SampleClaudeMD returns a sample CLAUDE.md content for testing.
func SampleClaudeMDFlutter ¶
func SampleClaudeMDFlutter() string
SampleClaudeMDFlutter returns a Flutter-focused CLAUDE.md for testing.
func SampleClaudeMDGo ¶
func SampleClaudeMDGo() string
SampleClaudeMDGo returns a Go-focused CLAUDE.md for testing.
func SampleClaudeMDJava ¶
func SampleClaudeMDJava() string
SampleClaudeMDJava returns a Java-focused CLAUDE.md for testing.
func SampleCommandMD ¶
SampleCommandMD returns sample command file content.
func SampleConfigYAML ¶
func SampleConfigYAML() string
SampleConfigYAML returns sample config YAML for testing.
func SampleProjectStateYAML ¶
func SampleProjectStateYAML() string
SampleProjectStateYAML returns sample project state YAML for testing.
func SampleSkillMD ¶
SampleSkillMD returns sample skill file content.
func SetGitRemote ¶
SetGitRemote sets the origin remote for a git repository.
Types ¶
This section is empty.