Skip to content
Snippets Groups Projects
Commit 0e272ca2 authored by Stephan Bosch's avatar Stephan Bosch
Browse files

Testsuite: forgot committing rename in previous commit.

parent 09137580
No related branches found
No related tags found
No related merge requests found
......@@ -15,24 +15,24 @@
#include "testsuite-common.h"
/*
* Test_compile command
* Test_script_compile command
*
* Syntax:
* test_compile <scriptpath: string>
* test_script_compile <scriptpath: string>
*/
static bool tst_test_compile_validate
static bool tst_test_script_compile_validate
(struct sieve_validator *validator, struct sieve_command_context *cmd);
static bool tst_test_compile_generate
static bool tst_test_script_compile_generate
(const struct sieve_codegen_env *cgenv, struct sieve_command_context *ctx);
const struct sieve_command tst_test_compile = {
"test_compile",
const struct sieve_command tst_test_script_compile = {
"test_script_compile",
SCT_TEST,
1, 0, FALSE, FALSE,
NULL, NULL,
tst_test_compile_validate,
tst_test_compile_generate,
tst_test_script_compile_validate,
tst_test_script_compile_generate,
NULL
};
......@@ -40,26 +40,26 @@ const struct sieve_command tst_test_compile = {
* Operation
*/
static bool tst_test_compile_operation_dump
static bool tst_test_script_compile_operation_dump
(const struct sieve_operation *op,
const struct sieve_dumptime_env *denv, sieve_size_t *address);
static int tst_test_compile_operation_execute
static int tst_test_script_compile_operation_execute
(const struct sieve_operation *op,
const struct sieve_runtime_env *renv, sieve_size_t *address);
const struct sieve_operation test_compile_operation = {
"TEST_COMPILE",
const struct sieve_operation test_script_compile_operation = {
"test_script_compile",
&testsuite_extension,
TESTSUITE_OPERATION_TEST_COMPILE,
tst_test_compile_operation_dump,
tst_test_compile_operation_execute
TESTSUITE_OPERATION_TEST_SCRIPT_COMPILE,
tst_test_script_compile_operation_dump,
tst_test_script_compile_operation_execute
};
/*
* Validation
*/
static bool tst_test_compile_validate
static bool tst_test_script_compile_validate
(struct sieve_validator *valdtr ATTR_UNUSED, struct sieve_command_context *tst)
{
struct sieve_ast_argument *arg = tst->first_positional;
......@@ -83,10 +83,10 @@ static inline struct testsuite_generator_context *
sieve_generator_extension_get_context(gentr, &testsuite_extension);
}
static bool tst_test_compile_generate
static bool tst_test_script_compile_generate
(const struct sieve_codegen_env *cgenv, struct sieve_command_context *tst)
{
sieve_operation_emit_code(cgenv->sbin, &test_compile_operation);
sieve_operation_emit_code(cgenv->sbin, &test_script_compile_operation);
/* Generate arguments */
return sieve_generate_arguments(cgenv, tst, NULL);
......@@ -96,11 +96,11 @@ static bool tst_test_compile_generate
* Code dump
*/
static bool tst_test_compile_operation_dump
static bool tst_test_script_compile_operation_dump
(const struct sieve_operation *op ATTR_UNUSED,
const struct sieve_dumptime_env *denv, sieve_size_t *address)
{
sieve_code_dumpf(denv, "TEST_COMPILE:");
sieve_code_dumpf(denv, "test_script_compile:");
sieve_code_descend(denv);
if ( !sieve_opr_string_dump(denv, address, "script") )
......@@ -113,7 +113,7 @@ static bool tst_test_compile_operation_dump
* Intepretation
*/
static int tst_test_compile_operation_execute
static int tst_test_script_compile_operation_execute
(const struct sieve_operation *op ATTR_UNUSED,
const struct sieve_runtime_env *renv, sieve_size_t *address)
{
......
......@@ -15,21 +15,21 @@
#include "testsuite-common.h"
/*
* Test_execute command
* Test_script_run command
*
* Syntax:
* test_execute
* test_script_run
*/
static bool tst_test_execute_generate
static bool tst_test_script_run_generate
(const struct sieve_codegen_env *cgenv, struct sieve_command_context *ctx);
const struct sieve_command tst_test_execute = {
"test_execute",
const struct sieve_command tst_test_script_run = {
"test_script_run",
SCT_TEST,
0, 0, FALSE, FALSE,
NULL, NULL, NULL,
tst_test_execute_generate,
tst_test_script_run_generate,
NULL
};
......@@ -37,27 +37,27 @@ const struct sieve_command tst_test_execute = {
* Operation
*/
static int tst_test_execute_operation_execute
static int tst_test_script_run_operation_execute
(const struct sieve_operation *op,
const struct sieve_runtime_env *renv, sieve_size_t *address);
const struct sieve_operation test_execute_operation = {
"TEST_EXECUTE",
const struct sieve_operation test_script_run_operation = {
"test_script_run",
&testsuite_extension,
TESTSUITE_OPERATION_TEST_EXECUTE,
TESTSUITE_OPERATION_TEST_SCRIPT_RUN,
NULL,
tst_test_execute_operation_execute
tst_test_script_run_operation_execute
};
/*
* Code generation
*/
static bool tst_test_execute_generate
static bool tst_test_script_run_generate
(const struct sieve_codegen_env *cgenv,
struct sieve_command_context *tst ATTR_UNUSED)
{
sieve_operation_emit_code(cgenv->sbin, &test_execute_operation);
sieve_operation_emit_code(cgenv->sbin, &test_script_run_operation);
return TRUE;
}
......@@ -66,7 +66,7 @@ static bool tst_test_execute_generate
* Intepretation
*/
static int tst_test_execute_operation_execute
static int tst_test_script_run_operation_execute
(const struct sieve_operation *op ATTR_UNUSED,
const struct sieve_runtime_env *renv,
sieve_size_t *address ATTR_UNUSED)
......@@ -77,7 +77,7 @@ static int tst_test_execute_operation_execute
* Perform operation
*/
result = testsuite_script_execute(renv);
result = testsuite_script_run(renv);
/* Set result */
sieve_interpreter_set_test_result(renv->interp, result);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment

Consent

On this website, we use the web analytics service Matomo to analyze and review the use of our website. Through the collected statistics, we can improve our offerings and make them more appealing for you. Here, you can decide whether to allow us to process your data and set corresponding cookies for these purposes, in addition to technically necessary cookies. Further information on data protection—especially regarding "cookies" and "Matomo"—can be found in our privacy policy. You can withdraw your consent at any time.