Hello community,

here is the log from the commit of package blogc for openSUSE:Factory checked 
in at 2018-07-23 18:02:26
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/blogc (Old)
 and      /work/SRC/openSUSE:Factory/.blogc.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "blogc"

Mon Jul 23 18:02:26 2018 rev:8 rq:624660 version:0.13.10

Changes:
--------
--- /work/SRC/openSUSE:Factory/blogc/blogc.changes      2018-06-19 
11:58:19.037942044 +0200
+++ /work/SRC/openSUSE:Factory/.blogc.new/blogc.changes 2018-07-23 
18:03:35.868738152 +0200
@@ -1,0 +2,7 @@
+Mon Jul 23 07:19:24 UTC 2018 - mvet...@suse.com
+
+- Update to 0.13.10:
+  * Fix bug in the config-parser, that prevented usage of keys
+    with empty values.
+
+-------------------------------------------------------------------

Old:
----
  blogc-0.13.9.tar.xz

New:
----
  blogc-0.13.10.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ blogc.spec ++++++
--- /var/tmp/diff_new_pack.E1SiRx/_old  2018-07-23 18:03:36.400737495 +0200
+++ /var/tmp/diff_new_pack.E1SiRx/_new  2018-07-23 18:03:36.404737489 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           blogc
-Version:        0.13.9
+Version:        0.13.10
 Release:        0
 Summary:        Blog compiler
 License:        BSD-3-Clause

++++++ blogc-0.13.9.tar.xz -> blogc-0.13.10.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/blogc-0.13.9/.tarball-version 
new/blogc-0.13.10/.tarball-version
--- old/blogc-0.13.9/.tarball-version   2018-06-13 00:21:10.000000000 +0200
+++ new/blogc-0.13.10/.tarball-version  2018-07-23 01:39:14.000000000 +0200
@@ -1 +1 @@
-0.13.9
+0.13.10
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/blogc-0.13.9/.version new/blogc-0.13.10/.version
--- old/blogc-0.13.9/.version   2018-06-13 00:21:10.000000000 +0200
+++ new/blogc-0.13.10/.version  2018-07-23 01:39:14.000000000 +0200
@@ -1 +1 @@
-0.13.9
+0.13.10
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/blogc-0.13.9/blogc-git-receiver.1 
new/blogc-0.13.10/blogc-git-receiver.1
--- old/blogc-0.13.9/blogc-git-receiver.1       2018-06-13 00:21:10.000000000 
+0200
+++ new/blogc-0.13.10/blogc-git-receiver.1      2018-07-23 01:39:14.000000000 
+0200
@@ -1,7 +1,7 @@
 .\" generated with Ronn/v0.7.3
 .\" http://github.com/rtomayko/ronn/tree/0.7.3
 .
-.TH "BLOGC\-GIT\-RECEIVER" "1" "June 2018" "Rafael G. Martins" "blogc Manual"
+.TH "BLOGC\-GIT\-RECEIVER" "1" "July 2018" "Rafael G. Martins" "blogc Manual"
 .
 .SH "NAME"
 \fBblogc\-git\-receiver\fR \- a simple login shell/git hook to deploy blogc 
websites
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/blogc-0.13.9/blogc-make.1 
new/blogc-0.13.10/blogc-make.1
--- old/blogc-0.13.9/blogc-make.1       2018-06-13 00:21:10.000000000 +0200
+++ new/blogc-0.13.10/blogc-make.1      2018-07-23 01:39:14.000000000 +0200
@@ -1,7 +1,7 @@
 .\" generated with Ronn/v0.7.3
 .\" http://github.com/rtomayko/ronn/tree/0.7.3
 .
-.TH "BLOGC\-MAKE" "1" "June 2018" "Rafael G. Martins" "blogc Manual"
+.TH "BLOGC\-MAKE" "1" "July 2018" "Rafael G. Martins" "blogc Manual"
 .
 .SH "NAME"
 \fBblogc\-make\fR \- a simple build tool for blogc
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/blogc-0.13.9/blogc-pagination.7 
new/blogc-0.13.10/blogc-pagination.7
--- old/blogc-0.13.9/blogc-pagination.7 2018-06-13 00:21:10.000000000 +0200
+++ new/blogc-0.13.10/blogc-pagination.7        2018-07-23 01:39:14.000000000 
+0200
@@ -1,7 +1,7 @@
 .\" generated with Ronn/v0.7.3
 .\" http://github.com/rtomayko/ronn/tree/0.7.3
 .
-.TH "BLOGC\-PAGINATION" "7" "June 2018" "Rafael G. Martins" "blogc Manual"
+.TH "BLOGC\-PAGINATION" "7" "July 2018" "Rafael G. Martins" "blogc Manual"
 .
 .SH "NAME"
 \fBblogc\-pagination\fR \- blogc\'s pagination support
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/blogc-0.13.9/blogc-runserver.1 
new/blogc-0.13.10/blogc-runserver.1
--- old/blogc-0.13.9/blogc-runserver.1  2018-06-13 00:21:10.000000000 +0200
+++ new/blogc-0.13.10/blogc-runserver.1 2018-07-23 01:39:14.000000000 +0200
@@ -1,7 +1,7 @@
 .\" generated with Ronn/v0.7.3
 .\" http://github.com/rtomayko/ronn/tree/0.7.3
 .
-.TH "BLOGC\-RUNSERVER" "1" "June 2018" "Rafael G. Martins" "blogc Manual"
+.TH "BLOGC\-RUNSERVER" "1" "July 2018" "Rafael G. Martins" "blogc Manual"
 .
 .SH "NAME"
 \fBblogc\-runserver\fR \- a simple HTTP server to test blogc websites
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/blogc-0.13.9/blogc-source.7 
new/blogc-0.13.10/blogc-source.7
--- old/blogc-0.13.9/blogc-source.7     2018-06-13 00:21:10.000000000 +0200
+++ new/blogc-0.13.10/blogc-source.7    2018-07-23 01:39:14.000000000 +0200
@@ -1,7 +1,7 @@
 .\" generated with Ronn/v0.7.3
 .\" http://github.com/rtomayko/ronn/tree/0.7.3
 .
-.TH "BLOGC\-SOURCE" "7" "June 2018" "Rafael G. Martins" "blogc Manual"
+.TH "BLOGC\-SOURCE" "7" "July 2018" "Rafael G. Martins" "blogc Manual"
 .
 .SH "NAME"
 \fBblogc\-source\fR \- blogc\'s source file format
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/blogc-0.13.9/blogc-template.7 
new/blogc-0.13.10/blogc-template.7
--- old/blogc-0.13.9/blogc-template.7   2018-06-13 00:21:10.000000000 +0200
+++ new/blogc-0.13.10/blogc-template.7  2018-07-23 01:39:14.000000000 +0200
@@ -1,7 +1,7 @@
 .\" generated with Ronn/v0.7.3
 .\" http://github.com/rtomayko/ronn/tree/0.7.3
 .
-.TH "BLOGC\-TEMPLATE" "7" "June 2018" "Rafael G. Martins" "blogc Manual"
+.TH "BLOGC\-TEMPLATE" "7" "July 2018" "Rafael G. Martins" "blogc Manual"
 .
 .SH "NAME"
 \fBblogc\-template\fR \- blogc\'s template format
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/blogc-0.13.9/blogc.1 new/blogc-0.13.10/blogc.1
--- old/blogc-0.13.9/blogc.1    2018-06-13 00:21:10.000000000 +0200
+++ new/blogc-0.13.10/blogc.1   2018-07-23 01:39:14.000000000 +0200
@@ -1,7 +1,7 @@
 .\" generated with Ronn/v0.7.3
 .\" http://github.com/rtomayko/ronn/tree/0.7.3
 .
-.TH "BLOGC" "1" "June 2018" "Rafael G. Martins" "blogc Manual"
+.TH "BLOGC" "1" "July 2018" "Rafael G. Martins" "blogc Manual"
 .
 .SH "NAME"
 \fBblogc\fR \- a blog compiler
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/blogc-0.13.9/blogc.spec new/blogc-0.13.10/blogc.spec
--- old/blogc-0.13.9/blogc.spec 2018-06-13 00:21:09.000000000 +0200
+++ new/blogc-0.13.10/blogc.spec        2018-07-23 01:39:13.000000000 +0200
@@ -1,11 +1,11 @@
 Name: blogc
-Version: 0.13.9
+Version: 0.13.10
 Release: 1%{?dist}
 License: BSD
 Group: Applications/Text
 Summary: A blog compiler
 URL: https://blogc.rgm.io/
-Source0: 
https://github.com/blogc/blogc/releases/download/v0.13.9/blogc-0.13.9.tar.xz
+Source0: 
https://github.com/blogc/blogc/releases/download/v0.13.10/blogc-0.13.10.tar.xz
 BuildRequires: libcmocka-devel, bash, coreutils, diffutils
 %if ! 0%{?el6}
 BuildRequires: git, tar, make
@@ -43,7 +43,7 @@
 blogc-runserver is a simple HTTP server to test blogc websites.
 
 %prep
-%setup -q -n blogc-0.13.9
+%setup -q -n blogc-0.13.10
 
 %build
 %if 0%{?el6}
@@ -88,6 +88,9 @@
 %license LICENSE
 
 %changelog
+* Sun Jul 22 2018 Rafael G. Martins <raf...@rafaelmartins.eng.br> 0.13.10-1
+- New release.
+
 * Tue Jun 12 2018 Rafael G. Martins <raf...@rafaelmartins.eng.br> 0.13.9-1
 - New release.
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/blogc-0.13.9/blogc.spec.in 
new/blogc-0.13.10/blogc.spec.in
--- old/blogc-0.13.9/blogc.spec.in      2018-06-13 00:20:43.000000000 +0200
+++ new/blogc-0.13.10/blogc.spec.in     2018-07-23 01:38:47.000000000 +0200
@@ -88,6 +88,9 @@
 %license LICENSE
 
 %changelog
+* Sun Jul 22 2018 Rafael G. Martins <raf...@rafaelmartins.eng.br> 0.13.10-1
+- New release.
+
 * Tue Jun 12 2018 Rafael G. Martins <raf...@rafaelmartins.eng.br> 0.13.9-1
 - New release.
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/blogc-0.13.9/blogcfile.5 
new/blogc-0.13.10/blogcfile.5
--- old/blogc-0.13.9/blogcfile.5        2018-06-13 00:21:10.000000000 +0200
+++ new/blogc-0.13.10/blogcfile.5       2018-07-23 01:39:14.000000000 +0200
@@ -1,7 +1,7 @@
 .\" generated with Ronn/v0.7.3
 .\" http://github.com/rtomayko/ronn/tree/0.7.3
 .
-.TH "BLOGCFILE" "5" "June 2018" "Rafael G. Martins" "blogc Manual"
+.TH "BLOGCFILE" "5" "July 2018" "Rafael G. Martins" "blogc Manual"
 .
 .SH "NAME"
 \fBblogcfile\fR \- blogc\-make\'s configuration file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/blogc-0.13.9/configure new/blogc-0.13.10/configure
--- old/blogc-0.13.9/configure  2018-06-13 00:21:04.000000000 +0200
+++ new/blogc-0.13.10/configure 2018-07-23 01:39:09.000000000 +0200
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for blogc 0.13.9.
+# Generated by GNU Autoconf 2.69 for blogc 0.13.10.
 #
 # Report bugs to <https://github.com/blogc/blogc>.
 #
@@ -590,8 +590,8 @@
 # Identity of this package.
 PACKAGE_NAME='blogc'
 PACKAGE_TARNAME='blogc'
-PACKAGE_VERSION='0.13.9'
-PACKAGE_STRING='blogc 0.13.9'
+PACKAGE_VERSION='0.13.10'
+PACKAGE_STRING='blogc 0.13.10'
 PACKAGE_BUGREPORT='https://github.com/blogc/blogc'
 PACKAGE_URL='https://blogc.rgm.io/'
 
@@ -1375,7 +1375,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures blogc 0.13.9 to adapt to many kinds of systems.
+\`configure' configures blogc 0.13.10 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1445,7 +1445,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of blogc 0.13.9:";;
+     short | recursive ) echo "Configuration of blogc 0.13.10:";;
    esac
   cat <<\_ACEOF
 
@@ -1572,7 +1572,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-blogc configure 0.13.9
+blogc configure 0.13.10
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1941,7 +1941,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by blogc $as_me 0.13.9, which was
+It was created by blogc $as_me 0.13.10, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -2806,7 +2806,7 @@
 
 # Define the identity of the package.
  PACKAGE='blogc'
- VERSION='0.13.9'
+ VERSION='0.13.10'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -14934,7 +14934,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by blogc $as_me 0.13.9, which was
+This file was extended by blogc $as_me 0.13.10, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -15001,7 +15001,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; 
s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-blogc config.status 0.13.9
+blogc config.status 0.13.10
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/blogc-0.13.9/src/common/config-parser.c 
new/blogc-0.13.10/src/common/config-parser.c
--- old/blogc-0.13.9/src/common/config-parser.c 2018-06-13 00:20:43.000000000 
+0200
+++ new/blogc-0.13.10/src/common/config-parser.c        2018-07-23 
01:38:47.000000000 +0200
@@ -174,6 +174,13 @@
                 if (c == '=') {
                     key = bc_strndup(src + start, current - start);
                     state = CONFIG_SECTION_VALUE_START;
+                    if (is_last) {
+                        bc_trie_insert(section->data, bc_str_strip(key),
+                            bc_strdup(""));
+                        free(key);
+                        key = NULL;
+                        break;
+                    }
                     if (value == NULL)
                         value = bc_string_new();
                     break;
@@ -197,6 +204,10 @@
                     state = CONFIG_SECTION_VALUE_QUOTE;
                     break;
                 }
+                if (c == '\r' || c == '\n' || is_last) {
+                    state = CONFIG_SECTION_VALUE;
+                    continue;
+                }
                 bc_string_append_c(value, c);
                 state = CONFIG_SECTION_VALUE;
                 break;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/blogc-0.13.9/tests/common/check_config_parser.c 
new/blogc-0.13.10/tests/common/check_config_parser.c
--- old/blogc-0.13.9/tests/common/check_config_parser.c 2018-06-13 
00:20:43.000000000 +0200
+++ new/blogc-0.13.10/tests/common/check_config_parser.c        2018-07-23 
01:38:47.000000000 +0200
@@ -601,6 +601,323 @@
 
 
 static void
+test_config_empty_values(void **state)
+{
+    const char *a =
+        "[foo]\n"
+        "asd =";
+    bc_error_t *err = NULL;
+    bc_config_t *c = bc_config_parse(a, strlen(a), NULL, &err);
+    assert_null(err);
+    assert_non_null(c);
+    assert_non_null(c->root);
+    assert_int_equal(bc_trie_size(c->root), 1);
+    char **s = bc_config_list_sections(c);
+    assert_non_null(s);
+    assert_int_equal(bc_strv_length(s), 1);
+    assert_string_equal(s[0], "foo");
+    assert_null(s[1]);
+    bc_strv_free(s);
+    assert_string_equal(bc_config_get(c, "foo", "asd"), "");
+    char **k = bc_config_list_keys(c, "foo");
+    assert_non_null(k);
+    assert_int_equal(bc_strv_length(k), 1);
+    assert_string_equal(k[0], "asd");
+    assert_null(k[1]);
+    bc_strv_free(k);
+    bc_config_free(c);
+
+    a =
+        "[foo]\n"
+        "asd = \n";
+    err = NULL;
+    c = bc_config_parse(a, strlen(a), NULL, &err);
+    assert_null(err);
+    assert_non_null(c);
+    assert_non_null(c->root);
+    assert_int_equal(bc_trie_size(c->root), 1);
+    s = bc_config_list_sections(c);
+    assert_non_null(s);
+    assert_int_equal(bc_strv_length(s), 1);
+    assert_string_equal(s[0], "foo");
+    assert_null(s[1]);
+    bc_strv_free(s);
+    assert_string_equal(bc_config_get(c, "foo", "asd"), "");
+    k = bc_config_list_keys(c, "foo");
+    assert_non_null(k);
+    assert_int_equal(bc_strv_length(k), 1);
+    assert_string_equal(k[0], "asd");
+    assert_null(k[1]);
+    bc_strv_free(k);
+    bc_config_free(c);
+
+    a =
+        "[foo]\n"
+        "asd = foo\n"
+        "qwe =";
+    err = NULL;
+    c = bc_config_parse(a, strlen(a), NULL, &err);
+    assert_null(err);
+    assert_non_null(c);
+    assert_non_null(c->root);
+    assert_int_equal(bc_trie_size(c->root), 1);
+    s = bc_config_list_sections(c);
+    assert_non_null(s);
+    assert_int_equal(bc_strv_length(s), 1);
+    assert_string_equal(s[0], "foo");
+    assert_null(s[1]);
+    bc_strv_free(s);
+    assert_string_equal(bc_config_get(c, "foo", "asd"), "foo");
+    assert_string_equal(bc_config_get(c, "foo", "qwe"), "");
+    k = bc_config_list_keys(c, "foo");
+    assert_non_null(k);
+    assert_int_equal(bc_strv_length(k), 2);
+    assert_string_equal(k[0], "asd");
+    assert_string_equal(k[1], "qwe");
+    assert_null(k[2]);
+    bc_strv_free(k);
+    bc_config_free(c);
+
+    a =
+        "[foo]\n"
+        "asd = foo\n"
+        "qwe = \n";
+    err = NULL;
+    c = bc_config_parse(a, strlen(a), NULL, &err);
+    assert_null(err);
+    assert_non_null(c);
+    assert_non_null(c->root);
+    assert_int_equal(bc_trie_size(c->root), 1);
+    s = bc_config_list_sections(c);
+    assert_non_null(s);
+    assert_int_equal(bc_strv_length(s), 1);
+    assert_string_equal(s[0], "foo");
+    assert_null(s[1]);
+    bc_strv_free(s);
+    assert_string_equal(bc_config_get(c, "foo", "asd"), "foo");
+    assert_string_equal(bc_config_get(c, "foo", "qwe"), "");
+    k = bc_config_list_keys(c, "foo");
+    assert_non_null(k);
+    assert_int_equal(bc_strv_length(k), 2);
+    assert_string_equal(k[0], "asd");
+    assert_string_equal(k[1], "qwe");
+    assert_null(k[2]);
+    bc_strv_free(k);
+    bc_config_free(c);
+
+    a =
+        "[foo]\n"
+        "asd =\n"
+        "qwe = foo";
+    err = NULL;
+    c = bc_config_parse(a, strlen(a), NULL, &err);
+    assert_null(err);
+    assert_non_null(c);
+    assert_non_null(c->root);
+    assert_int_equal(bc_trie_size(c->root), 1);
+    s = bc_config_list_sections(c);
+    assert_non_null(s);
+    assert_int_equal(bc_strv_length(s), 1);
+    assert_string_equal(s[0], "foo");
+    assert_null(s[1]);
+    bc_strv_free(s);
+    assert_string_equal(bc_config_get(c, "foo", "asd"), "");
+    assert_string_equal(bc_config_get(c, "foo", "qwe"), "foo");
+    k = bc_config_list_keys(c, "foo");
+    assert_non_null(k);
+    assert_int_equal(bc_strv_length(k), 2);
+    assert_string_equal(k[0], "asd");
+    assert_string_equal(k[1], "qwe");
+    assert_null(k[2]);
+    bc_strv_free(k);
+    bc_config_free(c);
+
+    a =
+        "[foo]\n"
+        "asd = \n"
+        "qwe = foo\n";
+    err = NULL;
+    c = bc_config_parse(a, strlen(a), NULL, &err);
+    assert_null(err);
+    assert_non_null(c);
+    assert_non_null(c->root);
+    assert_int_equal(bc_trie_size(c->root), 1);
+    s = bc_config_list_sections(c);
+    assert_non_null(s);
+    assert_int_equal(bc_strv_length(s), 1);
+    assert_string_equal(s[0], "foo");
+    assert_null(s[1]);
+    bc_strv_free(s);
+    assert_string_equal(bc_config_get(c, "foo", "asd"), "");
+    assert_string_equal(bc_config_get(c, "foo", "qwe"), "foo");
+    k = bc_config_list_keys(c, "foo");
+    assert_non_null(k);
+    assert_int_equal(bc_strv_length(k), 2);
+    assert_string_equal(k[0], "asd");
+    assert_string_equal(k[1], "qwe");
+    assert_null(k[2]);
+    bc_strv_free(k);
+    bc_config_free(c);
+
+    a =
+        "[foo]\r\n"
+        "asd =";
+    err = NULL;
+    c = bc_config_parse(a, strlen(a), NULL, &err);
+    assert_null(err);
+    assert_non_null(c);
+    assert_non_null(c->root);
+    assert_int_equal(bc_trie_size(c->root), 1);
+    s = bc_config_list_sections(c);
+    assert_non_null(s);
+    assert_int_equal(bc_strv_length(s), 1);
+    assert_string_equal(s[0], "foo");
+    assert_null(s[1]);
+    bc_strv_free(s);
+    assert_string_equal(bc_config_get(c, "foo", "asd"), "");
+    k = bc_config_list_keys(c, "foo");
+    assert_non_null(k);
+    assert_int_equal(bc_strv_length(k), 1);
+    assert_string_equal(k[0], "asd");
+    assert_null(k[1]);
+    bc_strv_free(k);
+    bc_config_free(c);
+
+    a =
+        "[foo]\r\n"
+        "asd = \r\n";
+    err = NULL;
+    c = bc_config_parse(a, strlen(a), NULL, &err);
+    assert_null(err);
+    assert_non_null(c);
+    assert_non_null(c->root);
+    assert_int_equal(bc_trie_size(c->root), 1);
+    s = bc_config_list_sections(c);
+    assert_non_null(s);
+    assert_int_equal(bc_strv_length(s), 1);
+    assert_string_equal(s[0], "foo");
+    assert_null(s[1]);
+    bc_strv_free(s);
+    assert_string_equal(bc_config_get(c, "foo", "asd"), "");
+    k = bc_config_list_keys(c, "foo");
+    assert_non_null(k);
+    assert_int_equal(bc_strv_length(k), 1);
+    assert_string_equal(k[0], "asd");
+    assert_null(k[1]);
+    bc_strv_free(k);
+    bc_config_free(c);
+
+    a =
+        "[foo]\r\n"
+        "asd = foo\r\n"
+        "qwe =";
+    err = NULL;
+    c = bc_config_parse(a, strlen(a), NULL, &err);
+    assert_null(err);
+    assert_non_null(c);
+    assert_non_null(c->root);
+    assert_int_equal(bc_trie_size(c->root), 1);
+    s = bc_config_list_sections(c);
+    assert_non_null(s);
+    assert_int_equal(bc_strv_length(s), 1);
+    assert_string_equal(s[0], "foo");
+    assert_null(s[1]);
+    bc_strv_free(s);
+    assert_string_equal(bc_config_get(c, "foo", "asd"), "foo");
+    assert_string_equal(bc_config_get(c, "foo", "qwe"), "");
+    k = bc_config_list_keys(c, "foo");
+    assert_non_null(k);
+    assert_int_equal(bc_strv_length(k), 2);
+    assert_string_equal(k[0], "asd");
+    assert_string_equal(k[1], "qwe");
+    assert_null(k[2]);
+    bc_strv_free(k);
+    bc_config_free(c);
+
+    a =
+        "[foo]\r\n"
+        "asd = foo\r\n"
+        "qwe = \r\n";
+    err = NULL;
+    c = bc_config_parse(a, strlen(a), NULL, &err);
+    assert_null(err);
+    assert_non_null(c);
+    assert_non_null(c->root);
+    assert_int_equal(bc_trie_size(c->root), 1);
+    s = bc_config_list_sections(c);
+    assert_non_null(s);
+    assert_int_equal(bc_strv_length(s), 1);
+    assert_string_equal(s[0], "foo");
+    assert_null(s[1]);
+    bc_strv_free(s);
+    assert_string_equal(bc_config_get(c, "foo", "asd"), "foo");
+    assert_string_equal(bc_config_get(c, "foo", "qwe"), "");
+    k = bc_config_list_keys(c, "foo");
+    assert_non_null(k);
+    assert_int_equal(bc_strv_length(k), 2);
+    assert_string_equal(k[0], "asd");
+    assert_string_equal(k[1], "qwe");
+    assert_null(k[2]);
+    bc_strv_free(k);
+    bc_config_free(c);
+
+    a =
+        "[foo]\r\n"
+        "asd =\r\n"
+        "qwe = foo";
+    err = NULL;
+    c = bc_config_parse(a, strlen(a), NULL, &err);
+    assert_null(err);
+    assert_non_null(c);
+    assert_non_null(c->root);
+    assert_int_equal(bc_trie_size(c->root), 1);
+    s = bc_config_list_sections(c);
+    assert_non_null(s);
+    assert_int_equal(bc_strv_length(s), 1);
+    assert_string_equal(s[0], "foo");
+    assert_null(s[1]);
+    bc_strv_free(s);
+    assert_string_equal(bc_config_get(c, "foo", "asd"), "");
+    assert_string_equal(bc_config_get(c, "foo", "qwe"), "foo");
+    k = bc_config_list_keys(c, "foo");
+    assert_non_null(k);
+    assert_int_equal(bc_strv_length(k), 2);
+    assert_string_equal(k[0], "asd");
+    assert_string_equal(k[1], "qwe");
+    assert_null(k[2]);
+    bc_strv_free(k);
+    bc_config_free(c);
+
+    a =
+        "[foo]\r\n"
+        "asd = \r\n"
+        "qwe = foo\r\n";
+    err = NULL;
+    c = bc_config_parse(a, strlen(a), NULL, &err);
+    assert_null(err);
+    assert_non_null(c);
+    assert_non_null(c->root);
+    assert_int_equal(bc_trie_size(c->root), 1);
+    s = bc_config_list_sections(c);
+    assert_non_null(s);
+    assert_int_equal(bc_strv_length(s), 1);
+    assert_string_equal(s[0], "foo");
+    assert_null(s[1]);
+    bc_strv_free(s);
+    assert_string_equal(bc_config_get(c, "foo", "asd"), "");
+    assert_string_equal(bc_config_get(c, "foo", "qwe"), "foo");
+    k = bc_config_list_keys(c, "foo");
+    assert_non_null(k);
+    assert_int_equal(bc_strv_length(k), 2);
+    assert_string_equal(k[0], "asd");
+    assert_string_equal(k[1], "qwe");
+    assert_null(k[2]);
+    bc_strv_free(k);
+    bc_config_free(c);
+}
+
+
+static void
 test_config_key_prefix(void **state)
 {
     const char *a =
@@ -710,6 +1027,7 @@
         unit_test(test_config_section_multiple_sections),
         unit_test(test_config_section_list),
         unit_test(test_config_quoted_values),
+        unit_test(test_config_empty_values),
         unit_test(test_config_key_prefix),
         unit_test(test_config_error_start),
         unit_test(test_config_error_section_with_newline),


Reply via email to