From: =?utf-8?b?T3R0byBLZWvDpGzDpGluZW4=?= <otto@debian.org>
Date: Tue, 3 Sep 2024 22:23:09 -0700
Subject: Patch system test to be able to test the installed 'entr' binary

Forwarded: not-needed
---
 system_test.sh | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/system_test.sh b/system_test.sh
index 34f6858..b10ed06 100755
--- a/system_test.sh
+++ b/system_test.sh
@@ -52,6 +52,13 @@ if [ $(uname) == 'Linux' ]; then
 	}
 fi
 
+# required binary
+if [ ! -x ./entr ]
+then
+	echo "INFO: No ./entr binary found. Testing the system binary /usr/bin/entr instead."
+	ln -s /usr/bin/entr entr
+fi
+
 # local binary, non-interactive by default
 alias entr='./entr -n'
 alias entr_tty='./entr'
@@ -59,6 +66,10 @@ alias entr_tty='./entr'
 # alias expansion is not enabled by default in non-interactive Bourne Again Shell (bash) sessions
 command -v shopt > /dev/null && shopt -s expand_aliases
 
+# show what version is being tested for easier to debug logs
+echo "INFO: Using entr version:"
+entr || true
+
 # fast tests
 
 try "no arguments"
