testutil

package
v0.29.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 11, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertFileContent

func AssertFileContent(t *testing.T, path string, expected string)

AssertFileContent はファイル内容が期待通りであることを確認

func AssertFileExists

func AssertFileExists(t *testing.T, path string)

AssertFileExists はファイルが存在することを確認

func AssertFileNotExists

func AssertFileNotExists(t *testing.T, path string)

AssertFileNotExists はファイルが存在しないことを確認

func CreateTempFile

func CreateTempFile(t *testing.T, dir, name, content string) string

CreateTempFile は一時ファイルを作成するヘルパー

func FileExists added in v0.29.0

func FileExists(t *testing.T, path string) bool

FileExists はファイルが存在するかチェック(boolを返す)

func MockConfirm

func MockConfirm(result bool) func(string) bool

MockConfirm はconfirm()関数をモックするヘルパー

func ReadFile

func ReadFile(t *testing.T, path string) (string, error)

ReadFile はファイルを読み込むヘルパー

func SetupTempHome

func SetupTempHome(t *testing.T) string

SetupTempHome は一時的なHOMEディレクトリを設定するヘルパー

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL