From 178de3ef611d49beff0741c165607b9643d74f67 Mon Sep 17 00:00:00 2001 From: cuiyudong123 Date: Mon, 27 May 2024 14:12:54 +0800 Subject: [PATCH] Adapt-tests-to-glib-2.66 --- t/g.t | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/t/g.t b/t/g.t index 4c7cd2c..2239a71 100644 --- a/t/g.t +++ b/t/g.t @@ -96,7 +96,11 @@ SKIP: { $key_file->set_comment('locales', 'mystring', 'comment'); like ($key_file->get_comment('locales', 'mystring'), qr/^comment$/); $key_file->set_comment('locales', undef, "another comment\n"); - is ($key_file->get_comment('locales', undef), "#another comment\n#"); + is ($key_file->get_comment('locales', undef), + Glib::major_version > 2 || + (Glib::major_version == 2 && Glib::minor_version >= 66) ? + "another comment\n" : "#another comment\n#" + ); $key_file->set_comment(undef, undef, 'one comment more'); like ($key_file->get_comment(undef, undef), qr/^one comment more$/); $key_file->set_boolean($start_group, 'boolkey', FALSE); -- 2.27.0