[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[SCM] Debian package checker branch, master, updated. 2.5.0-rc3-21-g3b7571c



The following commit has been merged in the master branch:
commit 3b7571c6b49949b75a48ab72c250c6cc406a9091
Author: Niels Thykier <niels@thykier.net>
Date:   Wed Apr 27 10:04:35 2011 +0200

    Added test for "shell script fails syntax check"

diff --git a/t/COVERAGE b/t/COVERAGE
index 263acf5..5ca9724 100644
--- a/t/COVERAGE
+++ b/t/COVERAGE
@@ -1,4 +1,4 @@
-Last generated 2011-04-15
+Last generated 2011-04-27
 
 The following tags are not tested by the test suite:
 
@@ -322,7 +322,6 @@ scripts calls-suidperl-directly
 scripts executable-not-elf-or-script
 scripts maintainer-script-ignores-errors
 scripts maintainer-script-removes-device-files
-scripts maintainer-shell-script-fails-syntax-check
 scripts php-script-but-no-phpX-cli-dep
 scripts python-script-but-no-python-dep
 scripts script-not-executable
@@ -472,7 +471,6 @@ libbaz
   control-file-has-bad-permissions
   debug-package-should-be-priority-extra
   ldconfig-symlink-missing-for-shlib
-  maintainer-shell-script-fails-syntax-check
   missing-dependency-on-perlapi
   missing-depends-line
   package-name-doesnt-match-sonames
diff --git a/t/tests/scripts-maintainer-general/debian/debian/prerm b/t/tests/scripts-maintainer-general/debian/debian/prerm
new file mode 100644
index 0000000..fcbd64e
--- /dev/null
+++ b/t/tests/scripts-maintainer-general/debian/debian/prerm
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+set -e
+
+# This script should fail a syntax check
+
+if [ "$1" = configure ] then # oh look - I forgot a ;
+    echo "Hallo world"
+fi
+
+#DEBHELPER#
diff --git a/t/tests/scripts-maintainer-general/desc b/t/tests/scripts-maintainer-general/desc
index 3fc420f..c69e0d9 100644
--- a/t/tests/scripts-maintainer-general/desc
+++ b/t/tests/scripts-maintainer-general/desc
@@ -19,6 +19,7 @@ Test-For:
  maintainer-script-needs-depends-on-ucf
  maintainer-script-needs-depends-on-xml-core
  maintainer-script-uses-dpkg-status-directly
+ maintainer-shell-script-fails-syntax-check
  possibly-insecure-handling-of-tmp-files-in-maintainer-script
  read-in-maintainer-script
  start-stop-daemon-in-maintainer-script
diff --git a/t/tests/scripts-maintainer-general/tags b/t/tests/scripts-maintainer-general/tags
index e0b8c5e..525d859 100644
--- a/t/tests/scripts-maintainer-general/tags
+++ b/t/tests/scripts-maintainer-general/tags
@@ -7,6 +7,7 @@ E: scripts-maintainer-general: maintainer-script-modifies-netbase-managed-file p
 E: scripts-maintainer-general: maintainer-script-modifies-netbase-managed-file postinst:60 /etc/protocols
 E: scripts-maintainer-general: maintainer-script-modifies-netbase-managed-file postinst:61 /etc/rpc
 E: scripts-maintainer-general: maintainer-script-uses-dpkg-status-directly postinst
+E: scripts-maintainer-general: maintainer-shell-script-fails-syntax-check prerm
 E: scripts-maintainer-general: read-in-maintainer-script postinst:10
 E: scripts-maintainer-general: suidregister-used-in-maintainer-script postinst
 W: scripts-maintainer-general: command-with-path-in-maintainer-script postinst:117 /usr/bin/foo

-- 
Debian package checker


Reply to: