<commit_before>#include <check.h>
#include <pkg.h>
#include <string.h>

#include "manifest.h"

char manifest[] = ""
	"@pkg_format_version 0.9\n"
	"@name foobar\n"
	"@version 0.3\n"
	"@origin foo/bar\n"
	"@comment A dummy manifest\n"
	"@arch amd64\n"
	"@osversion 800500\n"
	"@www http://www.foobar.com\n"
	"@maintainer <EMAIL>\n"
	"@dep depfoo dep/foo 1.2\n"
	"@dep depbar dep/bar 3.4\n"
	"@conflict foo-*\n"
	"@conflict bar-*\n"
	"@exec true && echo hello\n"
	"@exec false || echo world\n"
	"@option foo true\n"
	"@option bar false\n";

START_TEST(parse_manifest)
{
	struct pkg *p;
	struct pkg **deps;
	struct pkg_conflict **conflicts;
	struct pkg_exec **execs;
	struct pkg_options **options;
	int i;

	fail_unless(pkg_new(&p) == 0);
	fail_unless(pkg_parse_manifest(p, manifest) == 0);
<commit_msg>Fix typo.<commit_after>#include <check.h>
#include <pkg.h>
#include <string.h>

#include "manifest.h"

char manifest[] = ""
	"@pkg_format_version 0.9\n"
	"@name foobar\n"
	"@version 0.3\n"
	"@origin foo/bar\n"
	"@comment A dummy manifest\n"
	"@arch amd64\n"
	"@osversion 800500\n"
	"@www http://www.foobar.com\n"
	"@maintainer <EMAIL>\n"
	"@dep depfoo dep/foo 1.2\n"
	"@dep depbar dep/bar 3.4\n"
	"@conflict foo-*\n"
	"@conflict bar-*\n"
	"@exec true && echo hello\n"
	"@exec false || echo world\n"
	"@option foo true\n"
	"@option bar false\n";

START_TEST(parse_manifest)
{
	struct pkg *p;
	struct pkg **deps;
	struct pkg_conflict **conflicts;
	struct pkg_exec **execs;
	struct pkg_option **options;
	int i;

	fail_unless(pkg_new(&p) == 0);
	fail_unless(pkg_parse_manifest(p, manifest) == 0);

{'fraction_non_alphanumeric': 0.1876961707470182, 'fraction_numerical': 0.022598870056497175, 'mean_word_length': 4.295681063122924, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, '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': '5476670', 'n_tokens_mistral': 759, 'n_tokens_neox': 702, 'n_words': 159}