Documentation
¶
Index ¶
Constants ¶
const OutputFileEnvVar = "FAKE_MATLAB_OUTPUT_FILE"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Installation ¶ added in v0.7.0
type Installation struct {
Root string // The MATLAB root directory (e.g., tempdir)
PathEntry string // The directory to add to PATH (root/bin)
OutputFilePath string // Path where the fake writes its startup info as JSON
}
Installation holds the paths for a fake MATLAB installation.
func CreateExecutable ¶ added in v0.7.0
func CreateExecutable(t *testing.T) Installation
CreateExecutable compiles the fake MATLAB source and sets up a full installation layout.
func (Installation) ReadStartupInfo ¶ added in v0.7.0
func (i Installation) ReadStartupInfo() (StartupInfo, error)
ReadStartupInfo reads and parses the startup info written by the fake MATLAB executable.
type Placeholder ¶ added in v0.8.0
type Placeholder struct {
// contains filtered or unexported fields
}
Placeholder represents a non-functional MATLAB executable placeholder. Use this when tests only need a file to exist at the expected path.
func NewPlaceholder ¶ added in v0.8.0
func NewPlaceholder(matlabRoot string) (*Placeholder, error)
NewPlaceholder creates a fake MATLAB executable placeholder in the specified directory. The placeholder is a non-functional file that satisfies path detection checks.
The executable is created at matlabRoot/bin/<matlab-exe-name>.
func (*Placeholder) Dir ¶ added in v0.8.0
func (p *Placeholder) Dir() string
Dir returns the directory containing the MATLAB executable (the bin directory).
func (*Placeholder) Path ¶ added in v0.8.0
func (p *Placeholder) Path() string
Path returns the full path to the fake MATLAB executable.
type StartupInfo ¶ added in v0.7.0
StartupInfo is the JSON structure written by the fake MATLAB executable. It captures the process working directory and all command-line arguments.