Fix build against libyaml 0.2.5.
Taken from upstream:
https://github.com/tlsa/libcyaml/commit/0e947264b947f51f7ea785068637c4bfce5d4171
diff --git a/test/units/save.c b/test/units/save.c
--- a/test/units/save.c
+++ b/test/units/save.c
@@ -3476,7 +3476,7 @@ static bool test_save_sequence_null_values_int(
ttest_report_ctx_t *report,
const cyaml_config_t *config)
{
- static const unsigned char ref[] =
+ static const unsigned char ref1[] =
"---\n"
"- 7\n"
"- 6\n"
@@ -3487,6 +3487,18 @@ static bool test_save_sequence_null_values_int(
"- \n"
"- 0\n"
"...\n";
+ /* As of libyaml 0.2.5, trailing spaces are not emitted. */
+ static const unsigned char ref2[] =
+ "---\n"
+ "- 7\n"
+ "- 6\n"
+ "- 5\n"
+ "-\n"
+ "- 3\n"
+ "- 2\n"
+ "-\n"
+ "- 0\n"
+ "...\n";
static const int d[] = { 7, 6, 5, 4, 3, 2, 1, 0 };
static const int *data[] = { d + 0, d + 1, d + 2, NULL,
d + 4, d + 5, NULL, d + 7, };
@@ -3515,11 +3527,12 @@ static bool test_save_sequence_null_values_int(
return ttest_fail(&tc, cyaml_strerror(err));
}
- if (len != YAML_LEN(ref) || memcmp(ref, buffer, len) != 0) {
+ if ((len != YAML_LEN(ref1) || memcmp(ref1, buffer, len) != 0) &&
+ (len != YAML_LEN(ref2) || memcmp(ref2, buffer, len) != 0)) {
return ttest_fail(&tc, "Bad data:\n"
"EXPECTED (%zu):\n\n%.*s\n\n"
"GOT (%zu):\n\n%.*s\n",
- YAML_LEN(ref), YAML_LEN(ref), ref,
+ YAML_LEN(ref1), YAML_LEN(ref1), ref1,
len, len, buffer);
}
4b9f02eb98d53079dc416537a9620d'>diff
|
Age | Commit message (Expand) | Author |
2021-10-09 | Move (gnu home-services) to (gnu home services)....* gnu/home-services.scm (%guix-home-root-directory): Replace
gnu/home-services.scm with "gnu/home/services.scm".
Rename to gnu/home/services.scm.
* gnu/local.mk
(GNU_SYSTEM_MODULES): Rename gnu/home-services.scm to gnu/home/services.scm.
* doc/he-config-bare-bones.scm:
Replace (gnu home-services) with (gnu home services).
* gnu/home.scm: Same.
* gnu/home/services/fontutils.scm: Same.
* gnu/home/services/mcron.scm: Same.
* gnu/home/services/shells.scm: Same.
* gnu/home/services/shepherd.scm: Same.
* gnu/home/services/symlink-manager.scm: Same.
* gnu/home/services/xdg.scm: Same.
* guix/scripts/home.scm: Same.
* guix/self.scm: Same.
| Oleg Pykhalov |
2021-10-08 | gnu: Move (gnu home-services) to (gnu home services)....* gnu/home-services/configuration.scm: Move the content ...
* gnu/home/services/configuration.scm: ... here.
* doc/guix.texi:
Replace (gnu home-services mcron) with (gnu home services mcron).
Replace (gnu home-services) with (gnu home services).
* gnu/home.scm:
Replace (gnu home-services fontutils) with (gnu services fontutils).
Replace (gnu home-services shells) with (gnu home services shells).
Replace (gnu home-services symlink-manager) with
(gnu home services symlink-manager).
Replace (gnu home-services xdg) with (gnu home services xdg).
* gnu/home-services/fontutils.scm: Rename to gnu/services/fontutils.scm.
* gnu/home-services/mcron.scm: Move to gnu/home/services/mcron.scm.
Replace (gnu home-services shepherd) with (gnu home services shepherd).
* gnu/home-services.scm (%service-type-path):
Search home services in "gnu/services".
* gnu/home-services/shells.scm: Replace (gnu home-services configuration) with
(gnu home services configuration).
Rename to gnu/home/services/shells.scm.
Replace (gnu home-services utils) with (gnu home services utils).
* gnu/home-services/shepherd.scm: Move to gnu/home/services/shepherd.scm.
* gnu/home-services/symlink-manager.scm:
Rename to gnu/home/services/symlink-manager.scm.
* gnu/home-services/utils.scm: Rename to gnu/home/services/utils.scm.
* gnu/home-services/xdg.scm: Rename to gnu/home/services/xdg.scm.
* guix/scripts/home/import.scm:
Replace (gnu home-services bash) with (gnu home services bash).
* gnu/home-services.scm: Update documentation string.
* doc/he-config-bare-bones.scm:
Apply new (gnu home-services ...) modules location.
* gnu/local.mk (GNU_SYSTEM_MODULES): Same.
| Oleg Pykhalov |