remove ControlOnly port flag, since it was essentially unusable
[ardour.git] / libs / ardour / test / test_util.cc
index 3e9566c0e408ba2f7d633b4d90ca54050102b775..9b33f2676256fb623a377fba81f1f8b744b02c07 100644 (file)
@@ -16,7 +16,6 @@
     with this program; if not, write to the Free Software Foundation, Inc.,
     675 Mass Ave, Cambridge, MA 02139, USA.
 */
-#include <fstream>
 #include <sstream>
 
 #include <glibmm/fileutils.h>
@@ -27,6 +26,7 @@
 
 #include "ardour/session.h"
 #include "ardour/audioengine.h"
+#include "ardour/filesystem_paths.h"
 
 #include "test_util.h"
 
@@ -67,7 +67,7 @@ check_nodes (XMLNode const * p, XMLNode const * q, list<string> const & ignore_p
        CPPUNIT_ASSERT_EQUAL (qc.size(), pc.size());
        XMLNodeList::const_iterator k = pc.begin ();
        XMLNodeList::const_iterator l = qc.begin ();
-       
+
        while (k != pc.end ()) {
                check_nodes (*k, *l, ignore_properties);
                ++k;
@@ -103,7 +103,7 @@ create_and_start_dummy_backend ()
 
        CPPUNIT_ASSERT (AudioEngine::instance ());
        CPPUNIT_ASSERT (engine);
-       CPPUNIT_ASSERT (engine->set_backend ("None (Dummy)", "", ""));
+       CPPUNIT_ASSERT (engine->set_backend ("None (Dummy)", "Unit-Test", ""));
 
        init_post_engine ();
 
@@ -133,11 +133,12 @@ PBD::Searchpath
 test_search_path ()
 {
 #ifdef PLATFORM_WINDOWS
-       std::string wsp(g_win32_get_package_installation_directory_of_module(NULL));
-       return Glib::build_filename (wsp, "ardour_testdata");
-#else
-       return Glib::getenv("ARDOUR_TEST_PATH");
+       if (!getenv("ARDOUR_TEST_PATH")) {
+               std::string wsp(windows_package_directory_path());
+               return Glib::build_filename (wsp, "ardour_testdata");
+       }
 #endif
+       return Glib::getenv("ARDOUR_TEST_PATH");
 }
 
 std::string
@@ -151,3 +152,17 @@ get_test_sample_rate ()
 {
        return 44100;
 }
+
+void
+get_utf8_test_strings (std::vector<std::string>& result)
+{
+       // These are all translations of "Ardour" from google translate
+       result.push_back ("Ardour"); // Reference
+       result.push_back ("\320\277\321\213\320\273"); // Russian
+       result.push_back ("\305\276ar"); // Croatian
+       result.push_back ("\340\270\204\340\270\247\340\270\262\340\270\241\340\270\201\340\270\243\340\270\260\340\270\225\340\270\267\340\270\255\340\270\243\340\270\267\340\270\255\340\270\243\340\271\211\340\270\231"); // Thai
+       result.push_back ("\325\245\325\274\325\241\325\266\325\244"); // Armenian
+       result.push_back ("\340\246\254\340\247\215\340\246\257\340\246\227\340\247\215\340\246\260\340\246\244\340\246\276"); // Bengali
+       result.push_back ("\346\203\205\347\206\261"); // Japanese
+       result.push_back ("\347\203\255\346\203\205"); // Chinese (Simplified)
+}