[SCM] Git repository for devscripts branch, master, updated. v2.12.4-55-g9e10e6c
Benjamin Drung
bdrung at debian.org
Fri Oct 26 12:00:43 UTC 2012
The following commit has been merged in the master branch:
commit 9e10e6c254bbac786044049f77a5d5d06e331ac4
Author: Benjamin Drung <bdrung at debian.org>
Date: Fri Oct 26 14:00:26 2012 +0200
Add test case from Raphael Geissert for previous commit.
diff --git a/test/bashisms/hash.sh b/test/bashisms/hash.sh
new file mode 100644
index 0000000..74fc7f4
--- /dev/null
+++ b/test/bashisms/hash.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+: BASHISM; hash
+hash which # BASHISM
+hash -r # BASHISM
diff --git a/test/bashisms/hash.sh.out b/test/bashisms/hash.sh.out
new file mode 100644
index 0000000..c9136bb
--- /dev/null
+++ b/test/bashisms/hash.sh.out
@@ -0,0 +1,6 @@
+possible bashism in bashisms/hash.sh line 3 (hash):
+: BASHISM; hash
+possible bashism in bashisms/hash.sh line 4 (hash):
+hash which # BASHISM
+possible bashism in bashisms/hash.sh line 5 (hash):
+hash -r # BASHISM
diff --git a/test/test_checkbashisms b/test/test_checkbashisms
index 396ce51..fda4c48 100755
--- a/test/test_checkbashisms
+++ b/test/test_checkbashisms
@@ -101,6 +101,10 @@ test_gettext() {
found "bashisms/gettext.sh" "$(cat bashisms/gettext.sh.out)"
}
+test_hash() {
+ found "bashisms/hash.sh" "$(cat bashisms/hash.sh.out)"
+}
+
test_heredocs() {
found "bashisms/heredocs.sh" "$(cat bashisms/heredocs.sh.out)"
}
--
Git repository for devscripts
More information about the devscripts-devel
mailing list