summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2024-04-07 08:28:32 -0300
committerEuAndreh <eu@euandre.org>2024-04-07 08:35:50 -0300
commitd56bf7cae8157f6f75ccc59df1c945603e510f7d (patch)
treec8c87857de8693886b3d3e69e3fbde4ca18d7e76 /tests
parentsrc/logerr.c: Also *try* to log something when fprintf() and vfprintf() fail (diff)
downloadpindaiba-d56bf7cae8157f6f75ccc59df1c945603e510f7d.tar.gz
pindaiba-d56bf7cae8157f6f75ccc59df1c945603e510f7d.tar.xz
src/lib.c: Print project metadata on pindaiba_main
Diffstat (limited to 'tests')
-rwxr-xr-xtests/cli-opts.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/cli-opts.sh b/tests/cli-opts.sh
new file mode 100755
index 0000000..f8b9f0a
--- /dev/null
+++ b/tests/cli-opts.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+set -eu
+
+VERSION="$(awk '/^VERSION / { print $3 }' Makefile)"
+DATE="$(awk '/^DATE / { print $3 }' Makefile)"
+NAME="$(awk '/^NAME / { print $3 }' Makefile)"
+
+EXPECTED="$NAME $VERSION $DATE"
+GIVEN="$("$@")"
+
+if [ "$GIVEN" != "$EXPECTED" ]; then
+ exit 1
+fi