Expand description
Testing utilities.
This is inside src
rather than tests
since we use this code in some unit
tests.
Modules§
- pty
- Utilities for testing in a virtual terminal (PTY).
Structs§
- Git
- Wrapper around the Git executable, for testing.
- GitInit
Options - Options for
Git::init_repo_with_options
. - GitRun
Options - Options for
Git::run_with_options
. - GitWorktree
Wrapper - Represents a Git worktree for an existing Git repository on disk.
- GitWrapper
- Wrapper around a
Git
instance which cleans up the repository once dropped. - GitWrapper
With Remote Repo - Represents a pair of directories that will be cleaned up after this value
dropped. The two directories need to be
init
ed andclone
ed by the caller, respectively.
Functions§
- extract_
hint_ command - Find and extract the command to disable the hint mentioned in the output.
Returns the arguments to
git
which would disable the hint. - make_
git - Create a temporary directory for testing and a
Git
instance to use with it. - make_
git_ with_ remote_ repo - Create a
GitWrapperWithRemoteRepo
. - make_
git_ worktree - Create a new worktree for the provided repository.
- remove_
nondeterministic_ lines - Remove lines which are not present or different between Git versions.
- remove_
rebase_ lines - Remove some of the output from
git rebase
, as it seems to be non-deterministic as to whether or not it appears. - trim_
lines - Remove whitespace from the end of each line in the provided string.