summaryrefslogtreecommitdiffstats
path: root/tests/testprofile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/testprofile.cpp')
-rw-r--r--tests/testprofile.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/testprofile.cpp b/tests/testprofile.cpp
index cd9d51f0c..66f6eea5c 100644
--- a/tests/testprofile.cpp
+++ b/tests/testprofile.cpp
@@ -14,6 +14,23 @@
// ..dives/exportprofilereference.csv) and copy the former over the later and commit that change
// as well.
+void TestProfile::init()
+{
+ // Set UTF8 text codec as in real applications
+ QTextCodec::setCodecForLocale(QTextCodec::codecForMib(106));
+
+ // first, setup the preferences
+
+ // normally we should be able to do this - but it makes this test fail because the reference data
+ // assume that the prefs are all 0 / false
+ // copy_prefs(&default_prefs, &prefs);
+ // instead we just set up the cloud_base_url to prevent parse_file() from crashing
+ prefs.cloud_base_url = strdup(default_prefs.cloud_base_url);
+
+ QCoreApplication::setOrganizationName("Subsurface");
+ QCoreApplication::setOrganizationDomain("subsurface.hohndel.org");
+ QCoreApplication::setApplicationName("Subsurface");
+}
void TestProfile::testProfileExport()
{
prefs.planner_deco_mode = BUEHLMANN;