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

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


The following commit has been merged in the master branch:
commit 4548da89b2f03dc280c0dc68fa9d860d7d2db90d
Author: Benjamin Drung <bdrung at debian.org>
Date:   Thu Oct 25 21:40:07 2012 +0200

    Add test case from Raphael Geissert for previous commit.

diff --git a/test/bashisms/heredoc-with-dash.sh b/test/bashisms/heredoc-with-dash.sh
new file mode 100644
index 0000000..9200886
--- /dev/null
+++ b/test/bashisms/heredoc-with-dash.sh
@@ -0,0 +1,35 @@
+#!/bin/sh
+
+cat << -EOF1- 1>&2
+CLEAN
+-EOF1-
+
+cat << -EOF2 1>&2
+CLEAN
+-EOF2
+
+cat <<-EOF3 1>&2
+CLEAN
+	EOF3
+
+cat <<- EOF4 1>&2
+CLEAN
+	EOF4
+
+foo=bar
+
+cat << '-EOF1-' 1>&2
+CLEAN $foo
+-EOF1-
+
+cat << '-EOF2' 1>&2
+CLEAN $foo
+-EOF2
+
+cat <<-'EOF3' 1>&2
+CLEAN $foo
+	EOF3
+
+cat <<- 'EOF4' 1>&2
+CLEAN $foo
+	EOF4
diff --git a/test/test_checkbashisms b/test/test_checkbashisms
index 46bb282..6496fe1 100755
--- a/test/test_checkbashisms
+++ b/test/test_checkbashisms
@@ -89,6 +89,10 @@ test_heredocs() {
     found "bashisms/heredocs.sh" "$(cat bashisms/heredocs.sh.out)"
 }
 
+test_heredoc_with_dash() {
+    clean "bashisms/heredoc-with-dash.sh"
+}
+
 test_jobs() {
     found "bashisms/jobs.sh" "$(cat bashisms/jobs.sh.out)"
 }

-- 
Git repository for devscripts



More information about the devscripts-devel mailing list