summaryrefslogtreecommitdiffstats
path: root/test/bashisms/other-vars.sh
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--test/bashisms/other-vars.sh15
-rw-r--r--test/bashisms/other-vars.sh.out14
2 files changed, 29 insertions, 0 deletions
diff --git a/test/bashisms/other-vars.sh b/test/bashisms/other-vars.sh
new file mode 100644
index 0000000..46dbedc
--- /dev/null
+++ b/test/bashisms/other-vars.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+test() {
+ echo $FUNCNAME BASHISM
+}
+
+test
+
+echo $DIRSTACK BASHISM
+echo $SECONDS BASHISM
+echo $TMOUT BASHISM
+echo $TIMEFORMAT BASHISM
+TMOUT=2 # BASHISM
+read REPLY
+TIMEFORMAT='' # BASHISM
diff --git a/test/bashisms/other-vars.sh.out b/test/bashisms/other-vars.sh.out
new file mode 100644
index 0000000..1f0e2b2
--- /dev/null
+++ b/test/bashisms/other-vars.sh.out
@@ -0,0 +1,14 @@
+possible bashism in bashisms/other-vars.sh line 4 ($FUNCNAME):
+ echo $FUNCNAME BASHISM
+possible bashism in bashisms/other-vars.sh line 9 ($DIRSTACK):
+echo $DIRSTACK BASHISM
+possible bashism in bashisms/other-vars.sh line 10 ($SECONDS):
+echo $SECONDS BASHISM
+possible bashism in bashisms/other-vars.sh line 11 ($TMOUT):
+echo $TMOUT BASHISM
+possible bashism in bashisms/other-vars.sh line 12 ($TIMEFORMAT):
+echo $TIMEFORMAT BASHISM
+possible bashism in bashisms/other-vars.sh line 13 (TMOUT=):
+TMOUT=2 # BASHISM
+possible bashism in bashisms/other-vars.sh line 15 (TIMEFORMAT=):
+TIMEFORMAT='' # BASHISM