[SCM] Git repository for devscripts branch, master, updated. v2.12.4-72-gcf18b4b

Benjamin Drung bdrung at debian.org
Sat Nov 10 23:00:35 UTC 2012


The following commit has been merged in the master branch:
commit 655cc9bf830aef9dc7aa40a2a4972a51b19a5e6c
Author: Benjamin Drung <bdrung at debian.org>
Date:   Sat Nov 10 23:36:35 2012 +0100

    Add test case from Raphael Geissert for previous commit.

diff --git a/test/bashisms/brace-expansion.sh b/test/bashisms/brace-expansion.sh
new file mode 100644
index 0000000..c34ea21
--- /dev/null
+++ b/test/bashisms/brace-expansion.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+echo BASHISM{1..10}
+echo BASHISM{1..10..2}
+echo BASHISM{a..z}
+echo BASHISM{Z..a}
+echo BASHISM{a..z..2}
+echo {a.._}
+echo {a..9}
diff --git a/test/bashisms/brace-expansion.sh.out b/test/bashisms/brace-expansion.sh.out
new file mode 100644
index 0000000..843dc32
--- /dev/null
+++ b/test/bashisms/brace-expansion.sh.out
@@ -0,0 +1,10 @@
+possible bashism in bashisms/brace-expansion.sh line 3 (brace expansion, {a..b[..c]}should be $(seq a [c] b)):
+echo BASHISM{1..10}
+possible bashism in bashisms/brace-expansion.sh line 4 (brace expansion, {a..b[..c]}should be $(seq a [c] b)):
+echo BASHISM{1..10..2}
+possible bashism in bashisms/brace-expansion.sh line 5 (brace expansion):
+echo BASHISM{a..z}
+possible bashism in bashisms/brace-expansion.sh line 6 (brace expansion):
+echo BASHISM{Z..a}
+possible bashism in bashisms/brace-expansion.sh line 7 (brace expansion):
+echo BASHISM{a..z..2}
diff --git a/test/test_checkbashisms b/test/test_checkbashisms
index 15edb88..226a62b 100755
--- a/test/test_checkbashisms
+++ b/test/test_checkbashisms
@@ -59,6 +59,10 @@ test_basic_bash() {
     clean "-f bashisms/basic-bash.mk"
 }
 
+test_brace_expansion() {
+    found "-f bashisms/brace-expansion.sh" "$(cat bashisms/brace-expansion.sh.out)"
+}
+
 test_basic_bash_override() {
     clean "-f bashisms/basic-bash-override.mk"
 }

-- 
Git repository for devscripts



More information about the devscripts-devel mailing list