summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authormaddaat <git@maddaat.org>2026-04-10 18:20:08 +0400
committermaddaat <git@maddaat.org>2026-04-10 18:20:08 +0400
commit06ec4982b1d3be9582d1be8cc93f7285ca948a05 (patch)
tree041bd798c864c5998dfae39af7156b399641afd4 /tests
downloadautotools-project-06ec4982b1d3be9582d1be8cc93f7285ca948a05.tar
autotools-project-06ec4982b1d3be9582d1be8cc93f7285ca948a05.tar.gz
autotools-project-06ec4982b1d3be9582d1be8cc93f7285ca948a05.tar.bz2
autotools-project-06ec4982b1d3be9582d1be8cc93f7285ca948a05.tar.lz
autotools-project-06ec4982b1d3be9582d1be8cc93f7285ca948a05.tar.xz
autotools-project-06ec4982b1d3be9582d1be8cc93f7285ca948a05.tar.zst
autotools-project-06ec4982b1d3be9582d1be8cc93f7285ca948a05.zip
Initial commitHEADmaster
Diffstat (limited to 'tests')
-rw-r--r--tests/.gitignore1
-rw-r--r--tests/Makefile.am8
-rw-r--r--tests/test_foobar.c15
3 files changed, 24 insertions, 0 deletions
diff --git a/tests/.gitignore b/tests/.gitignore
new file mode 100644
index 0000000..8430234
--- /dev/null
+++ b/tests/.gitignore
@@ -0,0 +1 @@
+/test_foobar
diff --git a/tests/Makefile.am b/tests/Makefile.am
new file mode 100644
index 0000000..227a1a2
--- /dev/null
+++ b/tests/Makefile.am
@@ -0,0 +1,8 @@
+include $(top_srcdir)/make/shared.am
+
+TESTS =
+noinst_PROGRAMS = $(TESTS)
+
+TESTS += test_foobar
+test_foobar_LDADD = $(top_builddir)/libfoobar.a
+test_foobar_SOURCES = test_foobar.c
diff --git a/tests/test_foobar.c b/tests/test_foobar.c
new file mode 100644
index 0000000..bcde749
--- /dev/null
+++ b/tests/test_foobar.c
@@ -0,0 +1,15 @@
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#undef NDEBUG
+
+#include <assert.h>
+
+#include "../src/common.h"
+
+int main(void)
+{
+ assert(foobar_internal(2, 3) == 5);
+ return 0;
+}