[SCM] Git repository for devscripts branch, master, updated. v2.12.4-43-g227b8b8

Benjamin Drung bdrung at debian.org
Thu Oct 25 20:17:09 UTC 2012


The following commit has been merged in the master branch:
commit 3508ff4bcfbb920d819674d09673ce8631e1adb3
Author: Benjamin Drung <bdrung at debian.org>
Date:   Thu Oct 25 22:11:45 2012 +0200

    Add test case from Raphael Geissert for previous commit.

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
diff --git a/test/test_checkbashisms b/test/test_checkbashisms
index ee640b1..db31a58 100755
--- a/test/test_checkbashisms
+++ b/test/test_checkbashisms
@@ -117,6 +117,10 @@ test_negations() {
     found "bashisms/negations.sh" "$(cat bashisms/negations.sh.out)"
 }
 
+test_other_vars() {
+    found "bashisms/other-vars.sh" "$(cat bashisms/other-vars.sh.out)"
+}
+
 test_printf() {
     found "bashisms/printf.sh" "$(cat bashisms/printf.sh.out)"
 }

-- 
Git repository for devscripts



More information about the devscripts-devel mailing list