Documentation
¶
Index ¶
- type TestRepo
- func (r *TestRepo) AssertDiffContains(revision, expected string)
- func (r *TestRepo) AssertDiffEmpty(revision string)
- func (r *TestRepo) AssertDiffNotContains(revision, unexpected string)
- func (r *TestRepo) AssertFileContent(path, expected string)
- func (r *TestRepo) Commit(message string)
- func (r *TestRepo) GetChangeID(revision string) string
- func (r *TestRepo) GetDiff(revision string) string
- func (r *TestRepo) MustRun(args ...string) string
- func (r *TestRepo) ReadFile(path string) string
- func (r *TestRepo) Run(args ...string) (string, error)
- func (r *TestRepo) WriteFile(path, content string)
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 ¶
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 ¶
AssertDiffContains verifies diff contains expected string.
func (*TestRepo) AssertDiffEmpty ¶
AssertDiffEmpty verifies revision has no changes.
func (*TestRepo) AssertDiffNotContains ¶
AssertDiffNotContains verifies diff does not contain string.
func (*TestRepo) AssertFileContent ¶
AssertFileContent verifies file contents.
func (*TestRepo) GetChangeID ¶
GetChangeID returns the change ID for a revision.
Click to show internal directories.
Click to hide internal directories.