tests/data/726D8B0B0889B04E.key \
tests/data/beep-1.3-2.ip3.x86_64.pfm \
\
+ tests/data/beep.nm \
+ tests/data/kernel.nm \
+ \
tests/data/parser/test-comments.txt \
tests/data/parser/test-conditionals.txt \
tests/data/parser/test-declarations.txt \
--- /dev/null
+###############################################################################
+# IPFire.org - An Open Source Firewall Solution #
+# Copyright (C) - IPFire Development Team <info@ipfire.org> #
+###############################################################################
+
+name = beep
+version = 1.3
+release = 2
+
+groups = Applications/System
+url = http://www.johnath.com/beep/
+license = GPLv2+
+summary = Beep the PC speaker any number of ways.
+
+description
+ Beep allows the user to control the PC speaker with precision, \
+ allowing different sounds to indicate different events. While it \
+ can be run quite happily on the commandline, it's intended place \
+ of residence is within shell/perl scripts, notifying the user when \
+ something interesting occurs. Of course, it has no notion of \
+ what's interesting, but it's real good at that notifying part.
+end
+
+source_dl = http://www.johnath.com/beep/
+tarball = %{thisapp}.tar.gz
+
+build
+ build
+ make FLAGS="%{CFLAGS} %{LDFLAGS}" %{PARALLELISMFLAGS}
+ end
+
+ install
+ mkdir -pv %{BUILDROOT}/usr/bin
+ mkdir -pv %{BUILDROOT}/usr/share/man/man1
+
+ install -m 0755 beep %{BUILDROOT}/usr/bin
+ cp beep.1.gz %{BUILDROOT}/usr/share/man/man1
+ end
+end
+
+packages
+ package beep
+
+ package %{name}-debuginfo
+ template DEBUGINFO
+ end
+end
#include "../testsuite.h"
-static int test_parse(const struct test* t) {
- char* path = pakfire_path_join(TEST_SRC_PATH, "data/kernel.nm");
+static const char* makefiles[] = {
+ "data/beep.nm",
+ "data/kernel.nm",
+ NULL,
+};
- // Open file
- FILE* f = fopen(path, "r");
- ASSERT(f);
+static int test_parse(const struct test* t) {
+ const char** makefile = makefiles;
- PakfireParser parser = pakfire_parser_create(t->pakfire, NULL, NULL);
+ while (*makefile) {
+ char* path = pakfire_path_join(TEST_SRC_PATH, *makefile);
- int r = pakfire_parser_read(parser, f);
- ASSERT(r == 0);
+ // Open file
+ FILE* f = fopen(path, "r");
+ ASSERT(f);
- // Try to retrieve some value
- char* value = pakfire_parser_get(parser, "sources");
- ASSERT(value);
+ PakfireParser parser = pakfire_parser_create(t->pakfire, NULL, NULL);
- printf("VALUE: sources = %s\n", value);
- free(value);
+ int r = pakfire_parser_read(parser, f);
+ ASSERT(r == 0);
- // Cleanup
- free(path);
+ pakfire_parser_unref(parser);
+ free(path);
+ fclose(f);
- pakfire_parser_unref(parser);
+ // Next file
+ makefile++;
+ }
return EXIT_SUCCESS;
}