[SCM] Git repository for devscripts branch, master, updated. v2.11.7-47-g3b44148

Benjamin Drung bdrung at debian.org
Thu May 31 12:49:03 UTC 2012


The following commit has been merged in the master branch:
commit 3b441483e4c7326bac90274e9249ef18c96892da
Author: Benjamin Drung <bdrung at debian.org>
Date:   Thu May 31 14:48:33 2012 +0200

    Add first tests for licensecheck.

diff --git a/debian/changelog b/debian/changelog
index 978f015..6c90293 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -38,6 +38,7 @@ devscripts (2.11.8) UNRELEASED; urgency=low
     + dch --increment changes XbuildY to Xubuntu1 on Ubuntu (LP: #690230).
     + Try to guess the vendor based on the given distribution name (LP: #723715)
     + Prefer UBUMAIL over DEBEMAIL on Ubuntu (LP: #929846).
+  * Add first tests for licensecheck.
 
   [ Stefano Rivera ]
   * devscripts.Logger Don't substitute arguments into logged strings unless
diff --git a/test/licensecheck/gpl-2 b/test/licensecheck/gpl-2
new file mode 100644
index 0000000..20c48a3
--- /dev/null
+++ b/test/licensecheck/gpl-2
@@ -0,0 +1,10 @@
+#    Copyright (c) 2012 Devscripts developers
+#
+#    This program is free software; you can redistribute it and/or
+#    modify it under the terms of version 2 of the GNU General Public
+#    License as published by the Free Software Foundation.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
diff --git a/test/licensecheck/lgpl-2.1.c b/test/licensecheck/lgpl-2.1.c
new file mode 100644
index 0000000..c3c12ff
--- /dev/null
+++ b/test/licensecheck/lgpl-2.1.c
@@ -0,0 +1,15 @@
+/*
+ * Copyright (c) 2012 Devscripts developers
+ *
+ * The devscripts library is licensed under the terms of the GNU
+ * Lesser General Public License, version 2.1. Please see the file
+ * COPYING.LGPL.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
diff --git a/test/licensecheck/lgpl-2.1.h b/test/licensecheck/lgpl-2.1.h
new file mode 100644
index 0000000..d82a10c
--- /dev/null
+++ b/test/licensecheck/lgpl-2.1.h
@@ -0,0 +1,15 @@
+/*
+ * Copyright (c) 2012 Devscripts developers
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2.1 of the GNU Lesser General
+ * Public License published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, <http://www.gnu.org/licenses/>.
+ */
diff --git a/test/test_checkbashisms b/test/test_licensecheck
similarity index 78%
copy from test/test_checkbashisms
copy to test/test_licensecheck
index ded8a72..68af1ba 100755
--- a/test/test_checkbashisms
+++ b/test/test_licensecheck
@@ -14,20 +14,23 @@
 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
-COMMAND="../scripts/checkbashisms.pl"
+COMMAND="../scripts/licensecheck.pl"
 WORKDIR="$(readlink -f "${0%/*}")"
 
 . "${0%/*}/shunit2-helper-functions.sh"
 
-found() {
+license() {
     cd "$WORKDIR"
-    runCommand "$1" "" "$2" 1
+    runCommand "licensecheck/$1" "licensecheck/$1: $2 " "" 0
 }
 
-testSource() {
-    local result="possible bashism in bashisms/source line 2 (should be '.', not 'source'):
-source foo.sh"
-    found "bashisms/source" "$result"
+testLGPL() {
+    license "lgpl-2.1.c" "LGPL (v2.1)"
+    license "lgpl-2.1.h" "LGPL (v2.1)"
+}
+
+testGPL() {
+    license "gpl-2" "GPL (v2)"
 }
 
 . shunit2

-- 
Git repository for devscripts



More information about the devscripts-devel mailing list