chiark / gitweb /
tree-wide: drop license boilerplate
[elogind.git] / src / test / test-conf-parser.c
index c362041972500ddbc2c9850365d717eeba52fab2..acd543e5111335bd744c8904bb106d902b7dd386 100644 (file)
@@ -3,19 +3,6 @@
   This file is part of systemd.
 
   Copyright 2015 Ronny Chevalier
-
-  systemd is free software; you can redistribute it and/or modify it
-  under the terms of the GNU Lesser General Public License as published by
-  the Free Software Foundation; either version 2.1 of the License, or
-  (at your option) any later version.
-
-  systemd is distributed in the hope that it will be useful, but
-  WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-  Lesser General Public License for more details.
-
-  You should have received a copy of the GNU Lesser General Public License
-  along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
 #include "conf-parser.h"
@@ -306,11 +293,6 @@ static const char* const config_file[] = {
         "2\\\n"
         "3\n",
 
-        "[Section]\n"
-        "setting1=1\\\n"     /* continuation with extra trailing backslash at the end */
-        "2\\\n"
-        "3\\\n",
-
         "[Section]\n"
         "setting1=1\\\\\\\n" /* continuation with trailing escape symbols */
         "\\\\2\n",           /* note that C requires one level of escaping, so the
@@ -327,11 +309,6 @@ static const char* const config_file[] = {
         x1000("ABCD") "\\\n"
         "foobar",
 
-        "[Section]\n"
-        "setting1="          /* a line above LINE_MAX length, with continuation */
-        x1000("ABCD") "\\\n" /* and an extra trailing backslash */
-        "foobar\\\n",
-
         "[Section]\n"
         "setting1="          /* a line above the allowed limit: 9 + 1050000 + 1 */
         x1000(x1000("x") x10("abcde")) "\n",
@@ -385,27 +362,27 @@ static void test_config_parse(unsigned i, const char *s) {
                 assert_se(streq(setting1, "1"));
                 break;
 
-        case 4 ... 5:
+        case 4:
                 assert_se(r == 0);
                 assert_se(streq(setting1, "1 2 3"));
                 break;
 
-        case 6:
+        case 5:
                 assert_se(r == 0);
                 assert_se(streq(setting1, "1\\\\ \\\\2"));
                 break;
 
-        case 7:
+        case 6:
                 assert_se(r == 0);
                 assert_se(streq(setting1, x1000("ABCD")));
                 break;
 
-        case 8 ... 9:
+        case 7:
                 assert_se(r == 0);
                 assert_se(streq(setting1, x1000("ABCD") " foobar"));
                 break;
 
-        case 10 ... 11:
+        case 8 ... 9:
                 assert_se(r == -ENOBUFS);
                 assert_se(setting1 == NULL);
                 break;