integration

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TestRepo

type TestRepo struct {
	Dir string
	// contains filtered or unexported fields
}

TestRepo represents a temporary jj repository for testing.

func NewTestRepo

func NewTestRepo(t *testing.T) *TestRepo

NewTestRepo creates a new temporary jj repository, skipping the test when no jj binary is installed. Every test in this package drives the real CLI, so without one there is nothing to assert rather than something to fail.

func (*TestRepo) AssertDiffContains

func (r *TestRepo) AssertDiffContains(revision, expected string)

AssertDiffContains verifies diff contains expected string.

func (*TestRepo) AssertDiffEmpty

func (r *TestRepo) AssertDiffEmpty(revision string)

AssertDiffEmpty verifies revision has no changes.

func (*TestRepo) AssertDiffNotContains

func (r *TestRepo) AssertDiffNotContains(revision, unexpected string)

AssertDiffNotContains verifies diff does not contain string.

func (*TestRepo) AssertFileContent

func (r *TestRepo) AssertFileContent(path, expected string)

AssertFileContent verifies file contents.

func (*TestRepo) Commit

func (r *TestRepo) Commit(message string)

Commit creates a new commit with current changes.

func (*TestRepo) GetChangeID

func (r *TestRepo) GetChangeID(revision string) string

GetChangeID returns the change ID for a revision.

func (*TestRepo) GetDiff

func (r *TestRepo) GetDiff(revision string) string

GetDiff returns the diff for a revision.

func (*TestRepo) MustRun

func (r *TestRepo) MustRun(args ...string) string

MustRun executes a jj command and fails test on error.

func (*TestRepo) ReadFile

func (r *TestRepo) ReadFile(path string) string

ReadFile reads a file from the repository.

func (*TestRepo) Run

func (r *TestRepo) Run(args ...string) (string, error)

Run executes a jj command in the repository.

func (*TestRepo) WriteFile

func (r *TestRepo) WriteFile(path, content string)

WriteFile writes a file to the repository.

Jump to

Keyboard shortcuts

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