summaryrefslogtreecommitdiffstats
path: root/testing/resources/stdout_stderr_repo/tty-check-entry
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 18:05:20 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 18:05:20 +0000
commitc86df75ab11643fa4649cfe6ed5c4692d4ee342b (patch)
treede847f47ec2669e74b9a3459319579346b7c99df /testing/resources/stdout_stderr_repo/tty-check-entry
parentInitial commit. (diff)
downloadpre-commit-upstream/3.6.2.tar.xz
pre-commit-upstream/3.6.2.zip
Adding upstream version 3.6.2.upstream/3.6.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/resources/stdout_stderr_repo/tty-check-entry')
-rwxr-xr-xtesting/resources/stdout_stderr_repo/tty-check-entry11
1 files changed, 11 insertions, 0 deletions
diff --git a/testing/resources/stdout_stderr_repo/tty-check-entry b/testing/resources/stdout_stderr_repo/tty-check-entry
new file mode 100755
index 0000000..01a9d38
--- /dev/null
+++ b/testing/resources/stdout_stderr_repo/tty-check-entry
@@ -0,0 +1,11 @@
+#!/usr/bin/env bash
+t() {
+ if [ -t "$1" ]; then
+ echo "$2: True"
+ else
+ echo "$2: False"
+ fi
+}
+t 0 stdin
+t 1 stdout
+t 2 stderr