diff --git a/tests/FilesT.cpp b/tests/FilesT.cpp
index 6a8dac59..99f0e64b 100644
--- a/tests/FilesT.cpp
+++ b/tests/FilesT.cpp
@@ -586,3 +586,13 @@ TEST_CASE("[Files] Labels")
REQUIRE(xmlMidnam.find("") != xmlMidnam.npos);
REQUIRE(xmlMidnam.find("") != xmlMidnam.npos);
}
+
+TEST_CASE("[Files] Switch labels")
+{
+ sfz::Synth synth;
+ synth.loadSfzFile(fs::current_path() / "tests/TestFiles/labels_sw.sfz");
+ const std::string xmlMidnam = synth.exportMidnam();
+ REQUIRE(xmlMidnam.find("") != xmlMidnam.npos);
+ REQUIRE(xmlMidnam.find("") != xmlMidnam.npos);
+ REQUIRE(xmlMidnam.find("") != xmlMidnam.npos);
+}
diff --git a/tests/TestFiles/labels_sw.sfz b/tests/TestFiles/labels_sw.sfz
new file mode 100644
index 00000000..5c1721f9
--- /dev/null
+++ b/tests/TestFiles/labels_sw.sfz
@@ -0,0 +1,4 @@
+ sw_lokey=36 sw_hikey=40 sw_default=36
+ sw_last=36 sw_label=Sine lokey=41 sample=*sine
+ sw_last=38 sw_label=Triangle lokey=41 sample=*triangle
+ sw_last=40 sw_label=Saw lokey=41 sample=*saw