Skip to content

Commit 2d97729

Browse files
committed
tests: test for stripping spaces in front of config options
1 parent 06a66a2 commit 2d97729

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

tests/xbps/libxbps/config/main.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,14 +317,16 @@ ATF_TC_BODY(config_trim_values, tc)
317317
ATF_REQUIRE_EQ(xbps_init(&xh), 0);
318318

319319
/* should contain one repository */
320-
ATF_REQUIRE_EQ(xbps_array_count(xh.repositories), 2);
320+
ATF_REQUIRE_EQ(xbps_array_count(xh.repositories), 3);
321321

322322
/* should contain repository=1 */
323323
ATF_REQUIRE_EQ(xbps_array_get_cstring_nocopy(xh.repositories, 0, &repo), true);
324324
ATF_REQUIRE_STREQ(repo, "1");
325325
/* should contain repository=2 */
326326
ATF_REQUIRE_EQ(xbps_array_get_cstring_nocopy(xh.repositories, 1, &repo), true);
327327
ATF_REQUIRE_STREQ(repo, "2");
328+
ATF_REQUIRE_EQ(xbps_array_get_cstring_nocopy(xh.repositories, 2, &repo), true);
329+
ATF_REQUIRE_STREQ(repo, "3");
328330
}
329331

330332
ATF_TC(config_no_trailing_newline);

tests/xbps/libxbps/config/trim.cf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
repository= 1
2-
repository =2
2+
repository =2
3+
repository=3

0 commit comments

Comments
 (0)