summaryrefslogtreecommitdiff
path: root/src/testing/testing_api_loop.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/testing/testing_api_loop.c')
-rw-r--r--src/testing/testing_api_loop.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/testing/testing_api_loop.c b/src/testing/testing_api_loop.c
index e82ec33ab..290311c59 100644
--- a/src/testing/testing_api_loop.c
+++ b/src/testing/testing_api_loop.c
@@ -192,6 +192,28 @@ GNUNET_TESTING_interpreter_lookup_command (
/**
+ * Lookup command by label.
+ * All commands, first into the past, then into the furture are looked up.
+ *
+ * @param is interpreter to lookup command in
+ * @param label label of the command to lookup.
+ * @return the command, if it is found, or NULL.
+ */
+const struct GNUNET_TESTING_Command *
+GNUNET_TESTING_interpreter_lookup_command_all (
+ struct GNUNET_TESTING_Interpreter *is,
+ const char *label)
+{
+ const struct GNUNET_TESTING_Command *cmd;
+
+ cmd = get_command (is, label, GNUNET_NO);
+ if (NULL == cmd)
+ cmd = get_command (is, label, GNUNET_YES);
+ return cmd;
+}
+
+
+/**
* Finish the test run, return the final result.
*
* @param cls the `struct GNUNET_TESTING_Interpreter`