<commit_before>#include <unistd.h>
#include <limits.h>

#include "test.h"

#define CMDPREFIX NATUSBIN " -C natus.require.path=\"['" MODULEDIR "']\" -e '"

int onEngine(const char *engine, int argc, const char **argv) {
	char cmd[PATH_MAX];
	strncpy(cmd, CMDPREFIX, PATH_MAX);
	strncat(cmd, engine, PATH_MAX - strlen(cmd));
	strncat(cmd, "' ", PATH_MAX - strlen(cmd));
	if (argc > 1)
		strncat(cmd, argv[1], PATH_MAX - strlen(cmd));

	printf("%s\n", cmd);
	int es = system(cmd);
	return WEXITSTATUS(es);
}<commit_msg>fix runjstest to properly setup the NATUS_PATH<commit_after>#include <unistd.h>
#include <limits.h>

#include "test.h"

int onEngine(const char *engine, int argc, const char **argv) {
	char cmd[PATH_MAX];
	strncpy(cmd, NATUSBIN " -e '", PATH_MAX);
	strncat(cmd, engine, PATH_MAX - strlen(cmd));
	strncat(cmd, "' ", PATH_MAX - strlen(cmd));
	if (argc > 1)
		strncat(cmd, argv[1], PATH_MAX - strlen(cmd));

	putenv("NATUS_PATH=" MODULEDIR);
	printf("%s\n", cmd);
	int es = system(cmd);
	return WEXITSTATUS(es);
}
{'fraction_non_alphanumeric': 0.18226120857699804, 'fraction_numerical': 0.003898635477582846, 'mean_word_length': 5.076923076923077, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1602440', 'n_tokens_mistral': 421, 'n_tokens_neox': 410, 'n_words': 98}