summaryrefslogtreecommitdiffstats
path: root/src/xdg-autostart-generator/test-xdg-autostart.c
diff options
context:
space:
mode:
authorDavid Edmundson <kde@davidedmundson.co.uk>2022-09-13 14:06:09 +0200
committerYu Watanabe <watanabe.yu+github@gmail.com>2022-09-13 20:54:28 +0200
commit38429cb1e3f37c298aa20ab25d644c87a23dd2e2 (patch)
treef4e5cf42334039b1ded824ab313ab6fc250aed4c /src/xdg-autostart-generator/test-xdg-autostart.c
parentTODO: various things about partitioning (diff)
downloadsystemd-38429cb1e3f37c298aa20ab25d644c87a23dd2e2.tar.xz
systemd-38429cb1e3f37c298aa20ab25d644c87a23dd2e2.zip
xdg-autostart-service: Use common boolean parser
Technically the desktop entry specification says value should be the string "true" or "false". Pragmatically every desktop has their own parsing rules which are typically less strict on how to interpret other values. This caused some regressions downstream when we switched to the xdg-autostart-generator where existing handmade files contained values with "True" or "False".
Diffstat (limited to 'src/xdg-autostart-generator/test-xdg-autostart.c')
-rw-r--r--src/xdg-autostart-generator/test-xdg-autostart.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/xdg-autostart-generator/test-xdg-autostart.c b/src/xdg-autostart-generator/test-xdg-autostart.c
index e18c918daa..7866d3a7b4 100644
--- a/src/xdg-autostart-generator/test-xdg-autostart.c
+++ b/src/xdg-autostart-generator/test-xdg-autostart.c
@@ -48,6 +48,8 @@ static const char* const xdg_desktop_file[] = {
("[Desktop Entry]\n"
"Hidden=\t true\n"),
+ ("[Desktop Entry]\n"
+ "Hidden=\t True\n"),
};
static void test_xdg_desktop_parse_one(unsigned i, const char *s) {
@@ -75,6 +77,7 @@ static void test_xdg_desktop_parse_one(unsigned i, const char *s) {
assert_se(streq(service->exec_string, "a"));
break;
case 2:
+ case 3:
assert_se(service->hidden);
break;
}