KiCad PCB EDA Suite
Loading...
Searching...
No Matches
OverlappingEnvVarsFixture Struct Reference

Regression tests for overlapping-prefix environment variables. More...

Public Member Functions

 OverlappingEnvVarsFixture ()
 
 ~OverlappingEnvVarsFixture ()
 
ENV_VAR_MAP BuildEnvMap () const
 

Public Attributes

wxString rootDir
 
wxString outerDir
 
wxString innerDir
 
wxString targetDir
 

Detailed Description

Regression tests for overlapping-prefix environment variables.

Reproduces the scenario from a KiCad V10 bug report where users set both a versioned package path and a narrower user library path that is a descendant of the package path, e.g.

KICAD10_3RD_PARTY = /tmp/kicadlib KICAD_USER_LIB = /tmp/kicadlib/V10

Creating a symbol library at ${KICAD_USER_LIB}/symbols/test.kicad_sym round-trips through NormalizePath (at InsertRow time) and ExpandEnvVarSubstitutions (at plugin CreateLibrary time). If the round-trip loses fidelity, the plugin tries to open a malformed path and fails with a generic "Could not create the library file" error.

Definition at line 202 of file test_expand_text_vars.cpp.

Constructor & Destructor Documentation

◆ OverlappingEnvVarsFixture()

OverlappingEnvVarsFixture::OverlappingEnvVarsFixture ( )
inline

Definition at line 209 of file test_expand_text_vars.cpp.

References innerDir, outerDir, rootDir, and targetDir.

◆ ~OverlappingEnvVarsFixture()

OverlappingEnvVarsFixture::~OverlappingEnvVarsFixture ( )
inline

Definition at line 226 of file test_expand_text_vars.cpp.

Member Function Documentation

◆ BuildEnvMap()

ENV_VAR_MAP OverlappingEnvVarsFixture::BuildEnvMap ( ) const
inline

Definition at line 237 of file test_expand_text_vars.cpp.

References innerDir, and outerDir.

Member Data Documentation

◆ innerDir

wxString OverlappingEnvVarsFixture::innerDir

Definition at line 206 of file test_expand_text_vars.cpp.

Referenced by BuildEnvMap(), and OverlappingEnvVarsFixture().

◆ outerDir

wxString OverlappingEnvVarsFixture::outerDir

Definition at line 205 of file test_expand_text_vars.cpp.

Referenced by BuildEnvMap(), and OverlappingEnvVarsFixture().

◆ rootDir

wxString OverlappingEnvVarsFixture::rootDir

Definition at line 204 of file test_expand_text_vars.cpp.

Referenced by OverlappingEnvVarsFixture().

◆ targetDir

wxString OverlappingEnvVarsFixture::targetDir

Definition at line 207 of file test_expand_text_vars.cpp.

Referenced by OverlappingEnvVarsFixture().


The documentation for this struct was generated from the following file: