aboutsummaryrefslogtreecommitdiff
path: root/tests/loadtest.c
diff options
context:
space:
mode:
authorSteve Bennett <steveb@workware.net.au>2020-04-18 09:34:25 +1000
committerSteve Bennett <steveb@workware.net.au>2020-05-04 21:57:34 +1000
commitda82368c816c8d06f425aa3f25a2a918fdba1df1 (patch)
treee1dc05358910d168edc982ed05523d0b30ad24d5 /tests/loadtest.c
parent8a5861eb51c32e41d638181188c256c1dbb93c96 (diff)
downloadjimtcl-da82368c816c8d06f425aa3f25a2a918fdba1df1.zip
jimtcl-da82368c816c8d06f425aa3f25a2a918fdba1df1.tar.gz
jimtcl-da82368c816c8d06f425aa3f25a2a918fdba1df1.tar.bz2
tests: Add many new additional tests for code coverage
readdir, tty, utf8, signal, alarm, kill, file, jimsh, posix, aio, history, interp, pack, unpack, eventloop, exec, load, package, regexp, regsub Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'tests/loadtest.c')
-rw-r--r--tests/loadtest.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/tests/loadtest.c b/tests/loadtest.c
new file mode 100644
index 0000000..138e403
--- /dev/null
+++ b/tests/loadtest.c
@@ -0,0 +1,36 @@
+#include <jim.h>
+#include <jim-subcmd.h>
+
+static int loadtest_cmd_test(Jim_Interp *interp, int argc, Jim_Obj *const *argv)
+{
+ Jim_SetResult(interp, argv[0]);
+ return JIM_OK;
+}
+
+static const jim_subcmd_type loadtest_command_table[] = {
+ { "test",
+ "arg",
+ loadtest_cmd_test,
+ 1,
+ 1,
+ },
+ { NULL }
+};
+
+static int loadtest_cmd(Jim_Interp *interp, int argc, Jim_Obj *const *argv)
+{
+ return Jim_CallSubCmd(interp, Jim_ParseSubCmd(interp, loadtest_command_table, argc, argv), argc, argv);
+}
+
+#ifndef NO_ENTRYPOINT
+int Jim_loadtestInit(Jim_Interp *interp)
+{
+ if (Jim_PackageProvide(interp, "loadtest", "1.0", JIM_ERRMSG)) {
+ return JIM_ERR;
+ }
+
+ Jim_CreateCommand(interp, "loadtest", loadtest_cmd, 0, 0);
+
+ return JIM_OK;
+}
+#endif