1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
|
diff -up tests/test_partial_loader.c.old tests/test_partial_loader.c
--- tests/test_partial_loader.c.old 2020-08-19 14:49:19.309503731 +0200
+++ tests/test_partial_loader.c 2020-08-19 14:57:45.759371679 +0200
@@ -64,14 +64,14 @@ static struct handlebars_string * execut
// Check error
if( handlebars_error_num(ctx) != HANDLEBARS_SUCCESS ) {
// @todo maybe check message
- ck_abort_msg(handlebars_error_msg(ctx));
+ ck_abort_msg("%s", handlebars_error_msg(ctx));
goto done;
}
// Compile
handlebars_compiler_compile(compiler, parser->program);
if( handlebars_error_num(ctx) != HANDLEBARS_SUCCESS ) {
- ck_abort_msg(handlebars_error_msg(ctx));
+ ck_abort_msg("%s", handlebars_error_msg(ctx));
goto done;
}
@@ -97,7 +97,7 @@ static struct handlebars_string * execut
// Execute
handlebars_vm_execute(vm, module, context);
- ck_assert_msg(handlebars_error_msg(HBSCTX(vm)) == NULL, handlebars_error_msg(HBSCTX(vm)));
+ ck_assert_msg("%s", handlebars_error_msg(HBSCTX(vm)) == NULL, handlebars_error_msg(HBSCTX(vm)));
retval = talloc_steal(NULL, vm->buffer);
diff -up tests/test_spec_handlebars.c.old tests/test_spec_handlebars.c
--- tests/test_spec_handlebars.c.old 2020-08-19 15:02:14.938770019 +0200
+++ tests/test_spec_handlebars.c 2020-08-19 15:08:17.911897696 +0200
@@ -333,7 +333,7 @@ START_TEST(test_ast_to_string_on_handleb
// Check error
if( handlebars_error_num(ctx) != HANDLEBARS_SUCCESS ) {
- ck_assert_msg(0, handlebars_error_msg(ctx));
+ ck_assert_msg(0, "%s", handlebars_error_msg(ctx));
}
ast_str = handlebars_ast_to_string(ctx, parser->program);
@@ -345,7 +345,7 @@ START_TEST(test_ast_to_string_on_handleb
"" /*test->suite_name*/,
test->description, test->it, test->flags,
test->tmpl, expected, actual);
- ck_abort_msg(tmp);
+ ck_abort_msg("%s", tmp);
}
done:
@@ -447,7 +447,7 @@ static inline void run_test(struct gener
// Check error
if( handlebars_error_num(ctx) != HANDLEBARS_SUCCESS ) {
// @todo maybe check message
- ck_assert_msg(test->exception, handlebars_error_msg(ctx));
+ ck_assert_msg(test->exception, "%s", handlebars_error_msg(ctx));
goto done;
}
@@ -560,14 +560,14 @@ static inline void run_test(struct gener
if( 0 == regex_compare(tmp, handlebars_error_msg(HBSCTX(vm)), ®ex_error) ) {
// ok
} else {
- ck_assert_msg(0, regex_error);
+ ck_assert_msg(0, "%s", regex_error);
}
free(tmp);
} else {
ck_assert_str_eq(test->message, handlebars_error_msg(HBSCTX(vm)));
}
} else {
- ck_assert_msg(handlebars_error_msg(HBSCTX(vm)) == NULL, handlebars_error_msg(HBSCTX(vm)));
+ ck_assert_msg(handlebars_error_msg(HBSCTX(vm)) == NULL, "%s", handlebars_error_msg(HBSCTX(vm)));
ck_assert_ptr_ne(test->expected, NULL);
ck_assert_ptr_ne(vm->buffer, NULL);
@@ -577,7 +577,7 @@ static inline void run_test(struct gener
"" /*test->suite_name*/,
test->description, test->it, test->flags,
test->tmpl, test->expected, vm->buffer->val);
- ck_abort_msg(tmp);
+ ck_abort_msg("%s", tmp);
}
}
diff -up tests/test_spec_handlebars_compiler.c.old tests/test_spec_handlebars_compiler.c
--- tests/test_spec_handlebars_compiler.c.old 2020-08-19 15:01:47.311831778 +0200
+++ tests/test_spec_handlebars_compiler.c 2020-08-19 15:02:01.241800639 +0200
@@ -697,7 +697,7 @@ START_TEST(handlebars_spec_compiler)
test->suite_name,
test->description, test->it, test->flags,
test->tmpl, test->expected->val, actual->val);
- ck_abort_msg(tmp);
+ ck_abort_msg("%s", tmp);
}
/* } */
diff -up tests/test_spec_handlebars_parser.c.old tests/test_spec_handlebars_parser.c
--- tests/test_spec_handlebars_parser.c.old 2020-08-19 15:00:06.471057182 +0200
+++ tests/test_spec_handlebars_parser.c 2020-08-19 15:01:31.612866873 +0200
@@ -209,7 +209,7 @@ START_TEST(handlebars_spec_parser)
if( 0 == regex_compare(tmp, errmsgjs, ®ex_error) ) {
// ok
} else {
- ck_assert_msg(0, regex_error);
+ ck_assert_msg(0, "%s", regex_error);
}
free(tmp);
} else {
@@ -222,7 +222,7 @@ START_TEST(handlebars_spec_parser)
lesigh = handlebars_talloc_strdup_append(lesigh, errmsg);
lesigh = handlebars_talloc_strdup_append(lesigh, "\nTemplate: \n");
lesigh = handlebars_talloc_strdup_append(lesigh, test->tmpl);
- ck_assert_msg(0, lesigh);
+ ck_assert_msg(0, "%s", lesigh);
}
} else {
struct handlebars_string * output = handlebars_ast_print(HBSCTX(parser), parser->program);
@@ -238,10 +238,10 @@ START_TEST(handlebars_spec_parser)
lesigh = handlebars_talloc_strdup_append(lesigh, output->val);
lesigh = handlebars_talloc_strdup_append(lesigh, "\nTemplate: \n");
lesigh = handlebars_talloc_strdup_append(lesigh, test->tmpl);
- ck_assert_msg(0, lesigh);
+ ck_assert_msg(0, "%s", lesigh);
}
} else {
- ck_assert_msg(0, test->message);
+ ck_assert_msg(0, "%s", test->message);
}
handlebars_talloc_free(output);
diff -up tests/test_spec_mustache.c.old tests/test_spec_mustache.c
--- tests/test_spec_mustache.c.old 2020-08-19 15:09:13.225763729 +0200
+++ tests/test_spec_mustache.c 2020-08-19 15:10:04.588639326 +0200
@@ -258,7 +258,7 @@ START_TEST(test_ast_to_string_on_mustach
// Check error
if( handlebars_error_num(ctx) != HANDLEBARS_SUCCESS ) {
- ck_assert_msg(0, handlebars_error_msg(ctx));
+ ck_assert_msg(0, "%s", handlebars_error_msg(ctx));
}
ast_str = handlebars_ast_to_string(ctx, parser->program);
@@ -271,7 +271,7 @@ START_TEST(test_ast_to_string_on_mustach
"" /*test->suite_name*/,
test->name, test->desc, test->flags,
test->tmpl, expected, actual);
- ck_abort_msg(tmp);
+ ck_abort_msg("%s", tmp);
}
done:
@@ -322,7 +322,7 @@ START_TEST(test_mustache_spec)
// Check error
if( handlebars_error_num(ctx) != HANDLEBARS_SUCCESS ) {
- ck_assert_msg(0, handlebars_error_msg(ctx));
+ ck_assert_msg(0, "%s", handlebars_error_msg(ctx));
}
// Compile
@@ -330,7 +330,7 @@ START_TEST(test_mustache_spec)
handlebars_compiler_compile(compiler, parser->program);
if( handlebars_error_num(ctx) != HANDLEBARS_SUCCESS ) {
- ck_assert_msg(0, handlebars_error_msg(ctx));
+ ck_assert_msg(0, "%s", handlebars_error_msg(ctx));
}
// Serialize
@@ -368,7 +368,7 @@ START_TEST(test_mustache_spec)
// Check error
if( handlebars_error_num(ctx) != HANDLEBARS_SUCCESS ) {
- ck_assert_msg(0, handlebars_error_msg(ctx));
+ ck_assert_msg(0, "%s", handlebars_error_msg(ctx));
}
ck_assert_ptr_ne(vm->buffer, NULL);
@@ -379,7 +379,7 @@ START_TEST(test_mustache_spec)
"" /*test->suite_name*/,
test->name, test->desc, test->flags,
test->tmpl, test->expected, vm->buffer->val);
- ck_abort_msg(tmp);
+ ck_abort_msg("%s", tmp);
}
handlebars_context_dtor(ctx);
diff -up tests/test_value.c.old tests/test_value.c
--- tests/test_value.c.old 2020-08-19 14:58:55.777215189 +0200
+++ tests/test_value.c 2020-08-19 14:59:35.199127077 +0200
@@ -434,7 +434,7 @@ START_TEST(test_json_parse_error)
if( handlebars_setjmp_ex(context, &buf) ) {
char * error = NULL;
if( 0 != regex_compare("^JSON Parse error", handlebars_error_msg(context), &error) ) {
- ck_abort_msg(error);
+ ck_abort_msg("%s", error);
}
return;
}
@@ -451,7 +451,7 @@ START_TEST(test_yaml_parse_error)
if( handlebars_setjmp_ex(context, &buf) ) {
char * error = NULL;
if( 0 != regex_compare("^YAML Parse Error", handlebars_error_msg(context), &error) ) {
- ck_abort_msg(error);
+ ck_abort_msg("%s", error);
}
return;
}
|