Lines Matching refs:out

54 	pkgconf_buffer_t out = PKGCONF_BUFFER_INITIALIZER;  in test_emit_text_and_eval()  local
55 TEST_ASSERT_TRUE(pkgconf_bytecode_eval(client, &vars, &bc, &out, &saw_sysroot)); in test_emit_text_and_eval()
56 TEST_ASSERT_STRCMP_EQ(pkgconf_buffer_str_or_empty(&out), "plain"); in test_emit_text_and_eval()
58 pkgconf_buffer_finalize(&out); in test_emit_text_and_eval()
94 pkgconf_buffer_t out = PKGCONF_BUFFER_INITIALIZER; in test_emit_var_and_eval() local
95 TEST_ASSERT_TRUE(pkgconf_bytecode_eval(client, &vars, &bc, &out, &saw_sysroot)); in test_emit_var_and_eval()
96 TEST_ASSERT_STRCMP_EQ(pkgconf_buffer_str_or_empty(&out), "hello world"); in test_emit_var_and_eval()
98 pkgconf_buffer_finalize(&out); in test_emit_var_and_eval()
119 pkgconf_buffer_t out = PKGCONF_BUFFER_INITIALIZER; in test_emit_sysroot_and_eval() local
120 TEST_ASSERT_TRUE(pkgconf_bytecode_eval(client, &vars, &bc, &out, &saw_sysroot)); in test_emit_sysroot_and_eval()
122 TEST_ASSERT_STRCMP_EQ(pkgconf_buffer_str_or_empty(&out), "/sysroot/usr/include"); in test_emit_sysroot_and_eval()
124 pkgconf_buffer_finalize(&out); in test_emit_sysroot_and_eval()
135 pkgconf_buffer_t out = PKGCONF_BUFFER_INITIALIZER; in test_eval_null_args() local
139 TEST_ASSERT_FALSE(pkgconf_bytecode_eval(NULL, &vars, &bc, &out, NULL)); in test_eval_null_args()
140 TEST_ASSERT_FALSE(pkgconf_bytecode_eval(client, &vars, NULL, &out, NULL)); in test_eval_null_args()
143 pkgconf_buffer_finalize(&out); in test_eval_null_args()
151 pkgconf_buffer_t out = PKGCONF_BUFFER_INITIALIZER; in test_compile_null_args() local
154 TEST_ASSERT_FALSE(pkgconf_bytecode_compile(&out, NULL)); in test_compile_null_args()
156 pkgconf_buffer_finalize(&out); in test_compile_null_args()
167 char *out = pkgconf_bytecode_eval_str(client, &vars, "price: $$5 and $${notavar}", &saw_sysroot); in test_dollar_escape() local
168 TEST_ASSERT_NONNULL(out); in test_dollar_escape()
169 TEST_ASSERT_STRCMP_EQ(out, "price: $5 and ${notavar}"); in test_dollar_escape()
171 free(out); in test_dollar_escape()
184 char *out = pkgconf_bytecode_eval_str(client, &vars, "broken ${unclosed", &saw_sysroot); in test_malformed_unclosed() local
185 TEST_ASSERT_NONNULL(out); in test_malformed_unclosed()
186 TEST_ASSERT_STRCMP_EQ(out, "broken ${unclosed"); in test_malformed_unclosed()
188 free(out); in test_malformed_unclosed()
201 char *out = pkgconf_bytecode_eval_str(client, &vars, "empty ${} here", &saw_sysroot); in test_empty_braces() local
202 TEST_ASSERT_NONNULL(out); in test_empty_braces()
203 TEST_ASSERT_STRCMP_EQ(out, "empty ${} here"); in test_empty_braces()
205 free(out); in test_empty_braces()
220 char *out = pkgconf_bytecode_eval_str(client, &vars, "${pc_sysrootdir}/usr/lib", &saw_sysroot); in test_compile_time_sysroot() local
221 TEST_ASSERT_NONNULL(out); in test_compile_time_sysroot()
223 TEST_ASSERT_STRCMP_EQ(out, "/sysroot/usr/lib"); in test_compile_time_sysroot()
225 free(out); in test_compile_time_sysroot()
240 char *out = pkgconf_bytecode_eval_str(client, &vars, "${pc_sysrootdir}/usr/lib", &saw_sysroot); in test_sysroot_dot_disables() local
241 TEST_ASSERT_NONNULL(out); in test_sysroot_dot_disables()
242 TEST_ASSERT_STRCMP_EQ(out, "/usr/lib"); in test_sysroot_dot_disables()
244 free(out); in test_sysroot_dot_disables()
259 char *out = pkgconf_bytecode_eval_str(client, &vars, "${pc_sysrootdir}/usr/lib", &saw_sysroot); in test_sysroot_root_disables() local
260 TEST_ASSERT_NONNULL(out); in test_sysroot_root_disables()
261 TEST_ASSERT_STRCMP_EQ(out, "/usr/lib"); in test_sysroot_root_disables()
263 free(out); in test_sysroot_root_disables()
278 char *out = pkgconf_bytecode_eval_str(client, &vars, "${pc_sysrootdir}/usr/lib", &saw_sysroot); in test_sysroot_trailing_slash_trimmed() local
279 TEST_ASSERT_NONNULL(out); in test_sysroot_trailing_slash_trimmed()
281 TEST_ASSERT_STRCMP_EQ(out, "/sysroot/usr/lib"); in test_sysroot_trailing_slash_trimmed()
283 free(out); in test_sysroot_trailing_slash_trimmed()
299 char *out = pkgconf_bytecode_eval_str(client, &vars, "${pc_sysrootdir}/usr/lib", &saw_sysroot); in test_sysroot_normalizes_to_root_disables() local
300 TEST_ASSERT_NONNULL(out); in test_sysroot_normalizes_to_root_disables()
301 TEST_ASSERT_STRCMP_EQ(out, "/usr/lib"); in test_sysroot_normalizes_to_root_disables()
303 free(out); in test_sysroot_normalizes_to_root_disables()
318 char *out = pkgconf_bytecode_eval_str(client, &vars, "${loop}", &saw_sysroot); in test_circular_reference() local
322 if (out != NULL) in test_circular_reference()
323 free(out); in test_circular_reference()
377 pkgconf_buffer_t out = PKGCONF_BUFFER_INITIALIZER; in test_rewrite_selfrefs() local
378 TEST_ASSERT_TRUE(pkgconf_bytecode_eval(client, &vars, &bc, &out, &saw_sysroot)); in test_rewrite_selfrefs()
379 TEST_ASSERT_STRCMP_EQ(pkgconf_buffer_str_or_empty(&out), "old new"); in test_rewrite_selfrefs()
381 pkgconf_buffer_finalize(&out); in test_rewrite_selfrefs()
411 pkgconf_buffer_t out = PKGCONF_BUFFER_INITIALIZER; in test_rewrite_selfrefs_no_match() local
412 TEST_ASSERT_TRUE(pkgconf_bytecode_eval(client, &vars, &bc, &out, &saw_sysroot)); in test_rewrite_selfrefs_no_match()
413 TEST_ASSERT_STRCMP_EQ(pkgconf_buffer_str_or_empty(&out), "OTHER tail"); in test_rewrite_selfrefs_no_match()
415 pkgconf_buffer_finalize(&out); in test_rewrite_selfrefs_no_match()
431 char *out = pkgconf_bytecode_eval_str(client, &vars, "plain text value", &saw_sysroot); in test_eval_plain_text() local
433 TEST_ASSERT_NONNULL(out); in test_eval_plain_text()
434 TEST_ASSERT_STRCMP_EQ(out, "plain text value"); in test_eval_plain_text()
437 free(out); in test_eval_plain_text()
451 char *out = pkgconf_bytecode_eval_str(client, &vars, "${prefix}/lib", &saw_sysroot); in test_eval_variable_substitution() local
453 TEST_ASSERT_NONNULL(out); in test_eval_variable_substitution()
454 TEST_ASSERT_STRCMP_EQ(out, "/opt/foo/lib"); in test_eval_variable_substitution()
457 free(out); in test_eval_variable_substitution()
473 char *out = pkgconf_bytecode_eval_str(client, &vars, "-L${libdir}", &saw_sysroot); in test_eval_nested_variables() local
475 TEST_ASSERT_NONNULL(out); in test_eval_nested_variables()
476 TEST_ASSERT_STRCMP_EQ(out, "-L/usr/local/lib"); in test_eval_nested_variables()
478 free(out); in test_eval_nested_variables()
491 char *out = pkgconf_bytecode_eval_str(client, &vars, "prefix=${nonexistent}/end", &saw_sysroot); in test_eval_undefined_variable() local
493 TEST_ASSERT_NONNULL(out); in test_eval_undefined_variable()
494 TEST_ASSERT_STRCMP_EQ(out, "prefix=/end"); in test_eval_undefined_variable()
496 free(out); in test_eval_undefined_variable()
511 …char *out = pkgconf_bytecode_eval_str(client, &vars, "-I${prefix}/include -L${exec_prefix}/lib", &… in test_eval_multiple_variables() local
513 TEST_ASSERT_NONNULL(out); in test_eval_multiple_variables()
514 TEST_ASSERT_STRCMP_EQ(out, "-I/usr/include -L/usr/local/lib"); in test_eval_multiple_variables()
516 free(out); in test_eval_multiple_variables()
528 char *out = pkgconf_bytecode_eval_str(client, &vars, "", &saw_sysroot); in test_eval_empty_input() local
531 if (out != NULL) in test_eval_empty_input()
533 TEST_ASSERT_STRCMP_EQ(out, ""); in test_eval_empty_input()
534 free(out); in test_eval_empty_input()
553 char *out = pkgconf_bytecode_eval_str(client, &vars, "${includedir}", &saw_sysroot); in test_eval_sysroot_detection() local
555 TEST_ASSERT_NONNULL(out); in test_eval_sysroot_detection()
558 free(out); in test_eval_sysroot_detection()
592 char *out = pkgconf_variable_eval_str(client, &vars, v, &saw_sysroot); in test_compile_eval_roundtrip() local
593 TEST_ASSERT_NONNULL(out); in test_compile_eval_roundtrip()
594 TEST_ASSERT_STRCMP_EQ(out, "hello world"); in test_compile_eval_roundtrip()
596 free(out); in test_compile_eval_roundtrip()