diff --git a/src/ppd-driver-platform-profile.c b/src/ppd-driver-platform-profile.c index de3bf40..2f68d67 100644 --- a/src/ppd-driver-platform-profile.c +++ b/src/ppd-driver-platform-profile.c @@ -101,7 +101,7 @@ verify_acpi_platform_profile_choices (void) return PPD_PROBE_RESULT_FAIL; } - choices = g_strsplit (choices_str, "\n", -1); + choices = g_strsplit_set (choices_str, " \n", -1); if (g_strv_contains ((const char * const*) choices, "low-power") && g_strv_contains ((const char * const*) choices, "balanced") && g_strv_contains ((const char * const*) choices, "performance")) diff --git a/tests/integration-test b/tests/integration-test index 79d1528..4dcea3e 100755 --- a/tests/integration-test +++ b/tests/integration-test @@ -222,9 +222,9 @@ class Tests(dbusmock.DBusTestCase): acpi_dir = os.path.join(self.testbed.get_root_dir(), "sys/firmware/acpi/") os.makedirs(acpi_dir) with open(os.path.join(acpi_dir, "platform_profile") ,'w') as profile: - profile.write("performance") + profile.write("performance\n") with open(os.path.join(acpi_dir, "platform_profile_choices") ,'w') as choices: - choices.write("low-power\nbalanced\nperformance\n") + choices.write("low-power balanced performance\n") def assertEventually(self, condition, message=None, timeout=50): '''Assert that condition function eventually returns True.