Support Dolby-style WAV back surround names when guessing mappings (#2427).
[dcpomatic.git] / test / audio_mapping_test.cc
index 8599c6af561911ad67756d015e5bd4b8f4edb219..37f3d24764abed4c5cc34cc9fcdf516a56ead952 100644 (file)
@@ -27,7 +27,8 @@
 
 #include <boost/test/unit_test.hpp>
 #include "lib/audio_mapping.h"
-#include "lib/util.h"
+#include "lib/constants.h"
+#include "lib/compose.hpp"
 
 
 using std::list;
@@ -94,8 +95,12 @@ BOOST_AUTO_TEST_CASE (audio_mapping_guess_test)
        guess_check ("more_Lss_s.wav", 4);
        guess_check ("other_Rss.aiff", 5);
 
-       /* Only the filename should be taken into acccount */
+       /* Only the filename should be taken into account */
        guess_check ("-Lfe-/foo_L.wav", 0);
+
+       /* Dolby-style */
+       guess_check ("jake-Lrs-good.wav", 6);
+       guess_check ("elwood-Rrs-good.wav", 7);
 }