summaryrefslogtreecommitdiffstats
path: root/perl/perl-glib/perl-Glib-1.328-glib2.59-comment-linebreaks.patch
diff options
context:
space:
mode:
Diffstat (limited to 'perl/perl-glib/perl-Glib-1.328-glib2.59-comment-linebreaks.patch')
-rw-r--r--perl/perl-glib/perl-Glib-1.328-glib2.59-comment-linebreaks.patch42
1 files changed, 42 insertions, 0 deletions
diff --git a/perl/perl-glib/perl-Glib-1.328-glib2.59-comment-linebreaks.patch b/perl/perl-glib/perl-Glib-1.328-glib2.59-comment-linebreaks.patch
new file mode 100644
index 0000000000..5b00a291cc
--- /dev/null
+++ b/perl/perl-glib/perl-Glib-1.328-glib2.59-comment-linebreaks.patch
@@ -0,0 +1,42 @@
+diff -up Glib-1.328/t/g.t.comment-linebreaks Glib-1.328/t/g.t
+--- Glib-1.328/t/g.t.comment-linebreaks 2012-01-06 01:26:40.000000000 -0500
++++ Glib-1.328/t/g.t 2019-01-04 14:35:05.796603043 -0500
+@@ -84,7 +84,11 @@ SKIP: {
+ eq_array (\@bools, [FALSE, TRUE, FALSE]);
+
+ ok ($key_file->has_group('locales'));
+- is ($key_file->get_comment('locales', 'mystring'), "some string\n");
++ if (Glib->CHECK_VERSION (2, 59, 0)) {
++ is ($key_file->get_comment('locales', 'mystring'), "some string");
++ } else {
++ is ($key_file->get_comment('locales', 'mystring'), "some string\n");
++ }
+ is ($key_file->get_string('locales', 'mystring'), 'Good morning');
+ is ($key_file->get_locale_string('locales', 'mystring', 'it'), 'Buongiorno');
+
+@@ -94,11 +98,21 @@ SKIP: {
+ $key_file->set_string_list('listsection', 'stringlist', 'one', 'two', 'three');
+ $key_file->set_locale_string('locales', 'mystring', 'en', 'one');
+ $key_file->set_comment('locales', 'mystring', 'comment');
+- is ($key_file->get_comment('locales', 'mystring'), "comment\n");
+- $key_file->set_comment('locales', undef, "another comment\n");
+- is ($key_file->get_comment('locales', undef), "#another comment\n#");
++ if (Glib->CHECK_VERSION (2, 59, 0)) {
++ is ($key_file->get_comment('locales', 'mystring'), "comment");
++ $key_file->set_comment('locales', undef, "another comment");
++ is ($key_file->get_comment('locales', undef), "#another comment");
++ } else {
++ is ($key_file->get_comment('locales', 'mystring'), "comment\n");
++ $key_file->set_comment('locales', undef, "another comment\n");
++ is ($key_file->get_comment('locales', undef), "#another comment\n#");
++ }
+ $key_file->set_comment(undef, undef, 'one comment more');
+- is ($key_file->get_comment(undef, undef), "one comment more\n");
++ if (Glib->CHECK_VERSION (2, 59, 0)) {
++ is ($key_file->get_comment(undef, undef), "one comment more");
++ } else {
++ is ($key_file->get_comment(undef, undef), "one comment more\n");
++ }
+ $key_file->set_boolean($start_group, 'boolkey', FALSE);
+ $key_file->set_value($start_group, 'boolkey', '0');
+