aboutsummaryrefslogtreecommitdiffstats
path: root/LIBEXEC_COMMAND_INIT.c
diff options
context:
space:
mode:
Diffstat (limited to 'LIBEXEC_COMMAND_INIT.c')
-rw-r--r--LIBEXEC_COMMAND_INIT.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/LIBEXEC_COMMAND_INIT.c b/LIBEXEC_COMMAND_INIT.c
new file mode 100644
index 0000000..e211995
--- /dev/null
+++ b/LIBEXEC_COMMAND_INIT.c
@@ -0,0 +1,28 @@
+/* See LICENSE file for copyright and license details. */
+#include "common.h"
+#ifdef TEST
+
+
+int
+main(void)
+{
+ struct libexec_command cmd;
+
+ memset(&cmd, 127, sizeof(cmd));
+ cmd = LIBEXEC_COMMAND_INIT;
+
+ ASSERT_EQ_INT(cmd.library_version, LIBEXEC_VERSION);
+ ASSERT_EQ_ENUM(cmd.exec_how, LIBEXEC_ALLOW_NAME);
+ ASSERT_EQ_INT(cmd.exec_fd, -1);
+ ASSERT_IS_NULL(cmd.executable);
+ ASSERT_IS_NULL(cmd.arguments);
+ ASSERT_EQ_UINT(cmd.narguments, 0);
+ ASSERT_IS_NULL(cmd.plumings);
+ ASSERT_EQ_UINT(cmd.nplumings, 0);
+ ASSERT_IS_NULL(cmd.environ);
+
+ return 0;
+}
+
+
+#endif