Added a tests against backslashes in default_path

This commit is contained in:
Paul Ferrand 2019-12-03 15:35:27 +01:00
parent 958968a852
commit 2a7391c05e
3 changed files with 12 additions and 0 deletions

View file

@ -316,3 +316,11 @@ TEST_CASE("[Files] wrong (overlapping) replacement for defines")
REQUIRE( synth.getRegionView(2)->amplitudeCC->first == 10 ); REQUIRE( synth.getRegionView(2)->amplitudeCC->first == 10 );
REQUIRE( synth.getRegionView(2)->amplitudeCC->second == 34.0f ); REQUIRE( synth.getRegionView(2)->amplitudeCC->second == 34.0f );
} }
TEST_CASE("[Files] Specific bug: relative path with backslashes")
{
sfz::Synth synth;
synth.loadSfzFile(fs::current_path() / "tests/TestFiles/SpecificBugs/win_backslashes.sfz");
REQUIRE(synth.getNumRegions() == 1);
REQUIRE(synth.getRegionView(0)->sample == R"(closedhat.wav)");
}

Binary file not shown.

View file

@ -0,0 +1,4 @@
<control>
default_path=Xylo\Subfolder\
<region> sample=closedhat.wav