summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2016-03-23 01:08:19 +0900
committerSean Whitton <spwhitton@spwhitton.name>2016-03-23 01:08:19 +0900
commit366ae1dfd7460efc0f49a4ee9402192eb61759c9 (patch)
treeff16c4e8ee5e831d4b19da831b3b2c48b566af16 /tests
mozilla-devscripts (0.45.1) unstable; urgency=high
* Restore generation of iceweasel entries for Depends:, Enhances: etc. to ease the Iceweasel -> Firefox transition. (Closes: #818756) Update test suite accordingly. * Also restore generation of iceweasel-* binary packages. * Preemptively add generation of thunderbird entries for Depends:, Enhances: etc. for the upcoming Icedove -> Thunderbird transition. Update test suite accordingly. # imported from the archive
Diffstat (limited to 'tests')
-rw-r--r--tests/dh_xul-ext/all/debian/changelog5
-rw-r--r--tests/dh_xul-ext/all/debian/compat1
-rw-r--r--tests/dh_xul-ext/all/debian/control18
-rwxr-xr-xtests/dh_xul-ext/all/debian/rules8
-rw-r--r--tests/dh_xul-ext/all/install.rdf40
-rw-r--r--tests/dh_xul-ext/all_environment/debian/changelog5
-rw-r--r--tests/dh_xul-ext/all_environment/debian/compat1
-rw-r--r--tests/dh_xul-ext/all_environment/debian/control18
-rwxr-xr-xtests/dh_xul-ext/all_environment/debian/rules8
-rw-r--r--tests/dh_xul-ext/all_environment/install.rdf40
-rw-r--r--tests/dh_xul-ext/debian/debian/changelog5
-rw-r--r--tests/dh_xul-ext/debian/debian/compat1
-rw-r--r--tests/dh_xul-ext/debian/debian/control18
-rwxr-xr-xtests/dh_xul-ext/debian/debian/rules8
-rw-r--r--tests/dh_xul-ext/debian/install.rdf48
-rw-r--r--tests/dh_xul-ext/default-to-compatible/debian/changelog5
-rw-r--r--tests/dh_xul-ext/default-to-compatible/debian/compat1
-rw-r--r--tests/dh_xul-ext/default-to-compatible/debian/control18
-rwxr-xr-xtests/dh_xul-ext/default-to-compatible/debian/rules8
-rw-r--r--tests/dh_xul-ext/default-to-compatible/install.rdf24
-rw-r--r--tests/dh_xul-ext/expected_result/all.substvars5
-rw-r--r--tests/dh_xul-ext/expected_result/all_environment.substvars5
-rw-r--r--tests/dh_xul-ext/expected_result/debian.substvars5
-rw-r--r--tests/dh_xul-ext/expected_result/default-to-compatible.substvars5
-rw-r--r--tests/dh_xul-ext/expected_result/ubuntu.substvars5
-rwxr-xr-xtests/dh_xul-ext/test78
-rw-r--r--tests/dh_xul-ext/ubuntu/debian/changelog5
-rw-r--r--tests/dh_xul-ext/ubuntu/debian/compat1
-rw-r--r--tests/dh_xul-ext/ubuntu/debian/control18
-rwxr-xr-xtests/dh_xul-ext/ubuntu/debian/rules8
-rw-r--r--tests/dh_xul-ext/ubuntu/install.rdf40
-rwxr-xr-xtests/test-moz-version105
32 files changed, 560 insertions, 0 deletions
diff --git a/tests/dh_xul-ext/all/debian/changelog b/tests/dh_xul-ext/all/debian/changelog
new file mode 100644
index 0000000..1b45ee9
--- /dev/null
+++ b/tests/dh_xul-ext/all/debian/changelog
@@ -0,0 +1,5 @@
+test-package (1.0-1) UNRELEASED; urgency=low
+
+ * Initial release.
+
+ -- Benjamin Drung <bdrung@debian.org> Sat, 09 Jul 2011 12:55:23 +0200
diff --git a/tests/dh_xul-ext/all/debian/compat b/tests/dh_xul-ext/all/debian/compat
new file mode 100644
index 0000000..7f8f011
--- /dev/null
+++ b/tests/dh_xul-ext/all/debian/compat
@@ -0,0 +1 @@
+7
diff --git a/tests/dh_xul-ext/all/debian/control b/tests/dh_xul-ext/all/debian/control
new file mode 100644
index 0000000..1aea594
--- /dev/null
+++ b/tests/dh_xul-ext/all/debian/control
@@ -0,0 +1,18 @@
+Source: test-package
+Section: web
+Priority: extra
+Maintainer: Ubuntu Mozilla Team <ubuntu-mozillateam@lists.ubuntu.com>
+Build-Depends: debhelper (>= 7.0.50~), mozilla-devscripts (>= 0.22~)
+Standards-Version: 3.9.2
+
+Package: xul-ext-test-package
+Architecture: all
+Depends: ${misc:Depends}, ${xpi:Depends}
+Recommends: ${xpi:Recommends}
+Provides: ${xpi:Provides}
+Enhances: ${xpi:Enhances}
+Breaks: ${xpi:Breaks}
+Description: mozilla-devscripts test package
+ This is a test package designed to test some scripts in mozilla-devscripts.
+ It is part of the mozilla-devscripts test suite and may do very odd things. It
+ should not be installed like a regular package. It may be an empty package.
diff --git a/tests/dh_xul-ext/all/debian/rules b/tests/dh_xul-ext/all/debian/rules
new file mode 100755
index 0000000..c5e3b65
--- /dev/null
+++ b/tests/dh_xul-ext/all/debian/rules
@@ -0,0 +1,8 @@
+#!/usr/bin/make -f
+
+%:
+ dh $@
+
+override_dh_install:
+ dh_install install.rdf /usr/share/xul-ext/test-package/
+ ../../../dh_xul-ext --all
diff --git a/tests/dh_xul-ext/all/install.rdf b/tests/dh_xul-ext/all/install.rdf
new file mode 100644
index 0000000..744c1df
--- /dev/null
+++ b/tests/dh_xul-ext/all/install.rdf
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:em="http://www.mozilla.org/2004/em-rdf#">
+ <Description about="urn:mozilla:install-manifest">
+ <em:id>{deadda7a-fee1-dead-coo1-d00ddeadc0de}</em:id>
+ <em:version>1.0</em:version>
+ <em:name>mozilla-devscripts test package</em:name>
+ <em:targetApplication>
+ <Description>
+ <!-- Firefox -->
+ <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
+ <em:minVersion>3.5</em:minVersion>
+ <em:maxVersion>7.0a</em:maxVersion>
+ </Description>
+ </em:targetApplication>
+ <em:targetApplication>
+ <Description>
+ <!-- Icedove/Thunderbird -->
+ <em:id>{3550f703-e582-4d05-9a08-453d09bdfdc6}</em:id>
+ <em:minVersion>3.0</em:minVersion>
+ <em:maxVersion>7.0a1</em:maxVersion>
+ </Description>
+ </em:targetApplication>
+ <em:targetApplication>
+ <Description>
+ <!-- Iceape/Seamonkey -->
+ <em:id>{92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}</em:id>
+ <em:minVersion>2.0</em:minVersion>
+ <em:maxVersion>2.4</em:maxVersion>
+ </Description>
+ </em:targetApplication>
+ <em:targetApplication>
+ <Description>
+ <!-- Conkeror -->
+ <em:id>{a79fe89b-6662-4ff4-8e88-09950ad4dfde}</em:id>
+ <em:minVersion>0.1</em:minVersion>
+ <em:maxVersion>100.*</em:maxVersion>
+ </Description>
+ </em:targetApplication>
+ </Description>
+</RDF>
diff --git a/tests/dh_xul-ext/all_environment/debian/changelog b/tests/dh_xul-ext/all_environment/debian/changelog
new file mode 100644
index 0000000..1b45ee9
--- /dev/null
+++ b/tests/dh_xul-ext/all_environment/debian/changelog
@@ -0,0 +1,5 @@
+test-package (1.0-1) UNRELEASED; urgency=low
+
+ * Initial release.
+
+ -- Benjamin Drung <bdrung@debian.org> Sat, 09 Jul 2011 12:55:23 +0200
diff --git a/tests/dh_xul-ext/all_environment/debian/compat b/tests/dh_xul-ext/all_environment/debian/compat
new file mode 100644
index 0000000..7f8f011
--- /dev/null
+++ b/tests/dh_xul-ext/all_environment/debian/compat
@@ -0,0 +1 @@
+7
diff --git a/tests/dh_xul-ext/all_environment/debian/control b/tests/dh_xul-ext/all_environment/debian/control
new file mode 100644
index 0000000..1aea594
--- /dev/null
+++ b/tests/dh_xul-ext/all_environment/debian/control
@@ -0,0 +1,18 @@
+Source: test-package
+Section: web
+Priority: extra
+Maintainer: Ubuntu Mozilla Team <ubuntu-mozillateam@lists.ubuntu.com>
+Build-Depends: debhelper (>= 7.0.50~), mozilla-devscripts (>= 0.22~)
+Standards-Version: 3.9.2
+
+Package: xul-ext-test-package
+Architecture: all
+Depends: ${misc:Depends}, ${xpi:Depends}
+Recommends: ${xpi:Recommends}
+Provides: ${xpi:Provides}
+Enhances: ${xpi:Enhances}
+Breaks: ${xpi:Breaks}
+Description: mozilla-devscripts test package
+ This is a test package designed to test some scripts in mozilla-devscripts.
+ It is part of the mozilla-devscripts test suite and may do very odd things. It
+ should not be installed like a regular package. It may be an empty package.
diff --git a/tests/dh_xul-ext/all_environment/debian/rules b/tests/dh_xul-ext/all_environment/debian/rules
new file mode 100755
index 0000000..738481a
--- /dev/null
+++ b/tests/dh_xul-ext/all_environment/debian/rules
@@ -0,0 +1,8 @@
+#!/usr/bin/make -f
+
+%:
+ dh $@
+
+override_dh_install:
+ dh_install install.rdf /usr/share/xul-ext/test-package/
+ DH_XUL_EXT_VENDOR=all ../../../dh_xul-ext
diff --git a/tests/dh_xul-ext/all_environment/install.rdf b/tests/dh_xul-ext/all_environment/install.rdf
new file mode 100644
index 0000000..744c1df
--- /dev/null
+++ b/tests/dh_xul-ext/all_environment/install.rdf
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:em="http://www.mozilla.org/2004/em-rdf#">
+ <Description about="urn:mozilla:install-manifest">
+ <em:id>{deadda7a-fee1-dead-coo1-d00ddeadc0de}</em:id>
+ <em:version>1.0</em:version>
+ <em:name>mozilla-devscripts test package</em:name>
+ <em:targetApplication>
+ <Description>
+ <!-- Firefox -->
+ <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
+ <em:minVersion>3.5</em:minVersion>
+ <em:maxVersion>7.0a</em:maxVersion>
+ </Description>
+ </em:targetApplication>
+ <em:targetApplication>
+ <Description>
+ <!-- Icedove/Thunderbird -->
+ <em:id>{3550f703-e582-4d05-9a08-453d09bdfdc6}</em:id>
+ <em:minVersion>3.0</em:minVersion>
+ <em:maxVersion>7.0a1</em:maxVersion>
+ </Description>
+ </em:targetApplication>
+ <em:targetApplication>
+ <Description>
+ <!-- Iceape/Seamonkey -->
+ <em:id>{92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}</em:id>
+ <em:minVersion>2.0</em:minVersion>
+ <em:maxVersion>2.4</em:maxVersion>
+ </Description>
+ </em:targetApplication>
+ <em:targetApplication>
+ <Description>
+ <!-- Conkeror -->
+ <em:id>{a79fe89b-6662-4ff4-8e88-09950ad4dfde}</em:id>
+ <em:minVersion>0.1</em:minVersion>
+ <em:maxVersion>100.*</em:maxVersion>
+ </Description>
+ </em:targetApplication>
+ </Description>
+</RDF>
diff --git a/tests/dh_xul-ext/debian/debian/changelog b/tests/dh_xul-ext/debian/debian/changelog
new file mode 100644
index 0000000..1b45ee9
--- /dev/null
+++ b/tests/dh_xul-ext/debian/debian/changelog
@@ -0,0 +1,5 @@
+test-package (1.0-1) UNRELEASED; urgency=low
+
+ * Initial release.
+
+ -- Benjamin Drung <bdrung@debian.org> Sat, 09 Jul 2011 12:55:23 +0200
diff --git a/tests/dh_xul-ext/debian/debian/compat b/tests/dh_xul-ext/debian/debian/compat
new file mode 100644
index 0000000..7f8f011
--- /dev/null
+++ b/tests/dh_xul-ext/debian/debian/compat
@@ -0,0 +1 @@
+7
diff --git a/tests/dh_xul-ext/debian/debian/control b/tests/dh_xul-ext/debian/debian/control
new file mode 100644
index 0000000..1aea594
--- /dev/null
+++ b/tests/dh_xul-ext/debian/debian/control
@@ -0,0 +1,18 @@
+Source: test-package
+Section: web
+Priority: extra
+Maintainer: Ubuntu Mozilla Team <ubuntu-mozillateam@lists.ubuntu.com>
+Build-Depends: debhelper (>= 7.0.50~), mozilla-devscripts (>= 0.22~)
+Standards-Version: 3.9.2
+
+Package: xul-ext-test-package
+Architecture: all
+Depends: ${misc:Depends}, ${xpi:Depends}
+Recommends: ${xpi:Recommends}
+Provides: ${xpi:Provides}
+Enhances: ${xpi:Enhances}
+Breaks: ${xpi:Breaks}
+Description: mozilla-devscripts test package
+ This is a test package designed to test some scripts in mozilla-devscripts.
+ It is part of the mozilla-devscripts test suite and may do very odd things. It
+ should not be installed like a regular package. It may be an empty package.
diff --git a/tests/dh_xul-ext/debian/debian/rules b/tests/dh_xul-ext/debian/debian/rules
new file mode 100755
index 0000000..26712f4
--- /dev/null
+++ b/tests/dh_xul-ext/debian/debian/rules
@@ -0,0 +1,8 @@
+#!/usr/bin/make -f
+
+%:
+ dh $@
+
+override_dh_install:
+ dh_install install.rdf /usr/share/xul-ext/test-package/
+ DEB_VENDOR=Debian ../../../dh_xul-ext
diff --git a/tests/dh_xul-ext/debian/install.rdf b/tests/dh_xul-ext/debian/install.rdf
new file mode 100644
index 0000000..0b507de
--- /dev/null
+++ b/tests/dh_xul-ext/debian/install.rdf
@@ -0,0 +1,48 @@
+<?xml version="1.0"?>
+<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:em="http://www.mozilla.org/2004/em-rdf#">
+ <Description about="urn:mozilla:install-manifest">
+ <em:id>{deadda7a-fee1-dead-coo1-d00ddeadc0de}</em:id>
+ <em:version>1.0</em:version>
+ <em:name>mozilla-devscripts test package</em:name>
+ <em:targetApplication>
+ <Description>
+ <!-- Firefox -->
+ <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
+ <em:minVersion>3.5</em:minVersion>
+ <em:maxVersion>7.0a</em:maxVersion>
+ </Description>
+ </em:targetApplication>
+ <em:targetApplication>
+ <Description>
+ <!-- Icedove/Thunderbird -->
+ <em:id>{3550f703-e582-4d05-9a08-453d09bdfdc6}</em:id>
+ <em:minVersion>3.0</em:minVersion>
+ <em:maxVersion>7.0a1</em:maxVersion>
+ </Description>
+ </em:targetApplication>
+ <em:targetApplication>
+ <Description>
+ <!-- Iceape/Seamonkey -->
+ <em:id>{92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}</em:id>
+ <em:minVersion>2.0</em:minVersion>
+ <em:maxVersion>2.4</em:maxVersion>
+ </Description>
+ </em:targetApplication>
+ <em:targetApplication>
+ <Description>
+ <!-- Conkeror -->
+ <em:id>{a79fe89b-6662-4ff4-8e88-09950ad4dfde}</em:id>
+ <em:minVersion>0.1</em:minVersion>
+ <em:maxVersion>100.*</em:maxVersion>
+ </Description>
+ </em:targetApplication>
+ <em:targetApplication>
+ <Description>
+ <!-- Iceowl -->
+ <em:id>{718e30fb-e89b-41dd-9da7-e25a45638b28}</em:id>
+ <em:minVersion>1.5</em:minVersion>
+ <em:maxVersion>1.9</em:maxVersion>
+ </Description>
+ </em:targetApplication>
+ </Description>
+</RDF>
diff --git a/tests/dh_xul-ext/default-to-compatible/debian/changelog b/tests/dh_xul-ext/default-to-compatible/debian/changelog
new file mode 100644
index 0000000..1b45ee9
--- /dev/null
+++ b/tests/dh_xul-ext/default-to-compatible/debian/changelog
@@ -0,0 +1,5 @@
+test-package (1.0-1) UNRELEASED; urgency=low
+
+ * Initial release.
+
+ -- Benjamin Drung <bdrung@debian.org> Sat, 09 Jul 2011 12:55:23 +0200
diff --git a/tests/dh_xul-ext/default-to-compatible/debian/compat b/tests/dh_xul-ext/default-to-compatible/debian/compat
new file mode 100644
index 0000000..7f8f011
--- /dev/null
+++ b/tests/dh_xul-ext/default-to-compatible/debian/compat
@@ -0,0 +1 @@
+7
diff --git a/tests/dh_xul-ext/default-to-compatible/debian/control b/tests/dh_xul-ext/default-to-compatible/debian/control
new file mode 100644
index 0000000..1aea594
--- /dev/null
+++ b/tests/dh_xul-ext/default-to-compatible/debian/control
@@ -0,0 +1,18 @@
+Source: test-package
+Section: web
+Priority: extra
+Maintainer: Ubuntu Mozilla Team <ubuntu-mozillateam@lists.ubuntu.com>
+Build-Depends: debhelper (>= 7.0.50~), mozilla-devscripts (>= 0.22~)
+Standards-Version: 3.9.2
+
+Package: xul-ext-test-package
+Architecture: all
+Depends: ${misc:Depends}, ${xpi:Depends}
+Recommends: ${xpi:Recommends}
+Provides: ${xpi:Provides}
+Enhances: ${xpi:Enhances}
+Breaks: ${xpi:Breaks}
+Description: mozilla-devscripts test package
+ This is a test package designed to test some scripts in mozilla-devscripts.
+ It is part of the mozilla-devscripts test suite and may do very odd things. It
+ should not be installed like a regular package. It may be an empty package.
diff --git a/tests/dh_xul-ext/default-to-compatible/debian/rules b/tests/dh_xul-ext/default-to-compatible/debian/rules
new file mode 100755
index 0000000..26712f4
--- /dev/null
+++ b/tests/dh_xul-ext/default-to-compatible/debian/rules
@@ -0,0 +1,8 @@
+#!/usr/bin/make -f
+
+%:
+ dh $@
+
+override_dh_install:
+ dh_install install.rdf /usr/share/xul-ext/test-package/
+ DEB_VENDOR=Debian ../../../dh_xul-ext
diff --git a/tests/dh_xul-ext/default-to-compatible/install.rdf b/tests/dh_xul-ext/default-to-compatible/install.rdf
new file mode 100644
index 0000000..d8958fe
--- /dev/null
+++ b/tests/dh_xul-ext/default-to-compatible/install.rdf
@@ -0,0 +1,24 @@
+<?xml version="1.0"?>
+<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:em="http://www.mozilla.org/2004/em-rdf#">
+ <Description about="urn:mozilla:install-manifest">
+ <em:id>{deadda7a-fee1-dead-coo1-d00ddeadc0de}</em:id>
+ <em:version>1.0</em:version>
+ <em:name>mozilla-devscripts test package</em:name>
+ <em:targetApplication>
+ <Description>
+ <!-- Firefox -->
+ <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
+ <em:minVersion>4.0</em:minVersion>
+ <em:maxVersion>11</em:maxVersion>
+ </Description>
+ </em:targetApplication>
+ <em:targetApplication>
+ <Description>
+ <!-- Icedove/Thunderbird -->
+ <em:id>{3550f703-e582-4d05-9a08-453d09bdfdc6}</em:id>
+ <em:minVersion>5.0</em:minVersion>
+ <em:maxVersion>12.0</em:maxVersion>
+ </Description>
+ </em:targetApplication>
+ </Description>
+</RDF>
diff --git a/tests/dh_xul-ext/expected_result/all.substvars b/tests/dh_xul-ext/expected_result/all.substvars
new file mode 100644
index 0000000..7588166
--- /dev/null
+++ b/tests/dh_xul-ext/expected_result/all.substvars
@@ -0,0 +1,5 @@
+xpi:Depends=iceweasel (>= 3.5) | firefox (>= 3.5) | firefox-esr (>= 3.5) | thunderbird (>= 3.0) | icedove (>= 3.0) | conkeror | seamonkey (>= 2.0)
+xpi:Recommends=
+xpi:Breaks=conkeror (>> 100.+), firefox (<< 3.5), firefox (>> 7.0~a0), firefox-esr (<< 3.5), firefox-esr (>> 7.0~a0), icedove (<< 3.0), icedove (>> 7.0~a1+), iceweasel (<< 3.5), iceweasel (>> 7.0~a0), seamonkey (<< 2.0), seamonkey (>> 2.4+), thunderbird (<< 3.0), thunderbird (>> 7.0~a1+)
+xpi:Enhances=conkeror, firefox, firefox-esr, icedove, iceweasel, seamonkey, thunderbird
+xpi:Provides=conkeror-test-package, firefox-esr-test-package, firefox-test-package, icedove-test-package, iceweasel-test-package, seamonkey-test-package, test-package, thunderbird-test-package
diff --git a/tests/dh_xul-ext/expected_result/all_environment.substvars b/tests/dh_xul-ext/expected_result/all_environment.substvars
new file mode 100644
index 0000000..7588166
--- /dev/null
+++ b/tests/dh_xul-ext/expected_result/all_environment.substvars
@@ -0,0 +1,5 @@
+xpi:Depends=iceweasel (>= 3.5) | firefox (>= 3.5) | firefox-esr (>= 3.5) | thunderbird (>= 3.0) | icedove (>= 3.0) | conkeror | seamonkey (>= 2.0)
+xpi:Recommends=
+xpi:Breaks=conkeror (>> 100.+), firefox (<< 3.5), firefox (>> 7.0~a0), firefox-esr (<< 3.5), firefox-esr (>> 7.0~a0), icedove (<< 3.0), icedove (>> 7.0~a1+), iceweasel (<< 3.5), iceweasel (>> 7.0~a0), seamonkey (<< 2.0), seamonkey (>> 2.4+), thunderbird (<< 3.0), thunderbird (>> 7.0~a1+)
+xpi:Enhances=conkeror, firefox, firefox-esr, icedove, iceweasel, seamonkey, thunderbird
+xpi:Provides=conkeror-test-package, firefox-esr-test-package, firefox-test-package, icedove-test-package, iceweasel-test-package, seamonkey-test-package, test-package, thunderbird-test-package
diff --git a/tests/dh_xul-ext/expected_result/debian.substvars b/tests/dh_xul-ext/expected_result/debian.substvars
new file mode 100644
index 0000000..1391809
--- /dev/null
+++ b/tests/dh_xul-ext/expected_result/debian.substvars
@@ -0,0 +1,5 @@
+xpi:Depends=iceweasel (>= 3.5) | firefox (>= 3.5) | firefox-esr (>= 3.5) | thunderbird (>= 3.0) | icedove (>= 3.0) | conkeror | iceowl
+xpi:Recommends=
+xpi:Breaks=conkeror (>> 100.+), firefox (<< 3.5), firefox (>> 7.0~a0), firefox-esr (<< 3.5), firefox-esr (>> 7.0~a0), icedove (<< 3.0), icedove (>> 7.0~a1+), iceowl (>> 1.9+), iceweasel (<< 3.5), iceweasel (>> 7.0~a0), thunderbird (<< 3.0), thunderbird (>> 7.0~a1+)
+xpi:Enhances=conkeror, firefox, firefox-esr, icedove, iceowl, iceweasel, thunderbird
+xpi:Provides=conkeror-test-package, firefox-esr-test-package, firefox-test-package, icedove-test-package, iceowl-test-package, iceweasel-test-package, test-package, thunderbird-test-package
diff --git a/tests/dh_xul-ext/expected_result/default-to-compatible.substvars b/tests/dh_xul-ext/expected_result/default-to-compatible.substvars
new file mode 100644
index 0000000..6b87b82
--- /dev/null
+++ b/tests/dh_xul-ext/expected_result/default-to-compatible.substvars
@@ -0,0 +1,5 @@
+xpi:Depends=iceweasel (>= 4.0) | firefox (>= 4.0) | firefox-esr (>= 4.0) | thunderbird (>= 5.0) | icedove (>= 5.0)
+xpi:Recommends=
+xpi:Breaks=firefox (<< 4.0), firefox-esr (<< 4.0), icedove (<< 5.0), iceweasel (<< 4.0), thunderbird (<< 5.0)
+xpi:Enhances=firefox, firefox-esr, icedove, iceweasel, thunderbird
+xpi:Provides=firefox-esr-test-package, firefox-test-package, icedove-test-package, iceweasel-test-package, test-package, thunderbird-test-package
diff --git a/tests/dh_xul-ext/expected_result/ubuntu.substvars b/tests/dh_xul-ext/expected_result/ubuntu.substvars
new file mode 100644
index 0000000..81ff22d
--- /dev/null
+++ b/tests/dh_xul-ext/expected_result/ubuntu.substvars
@@ -0,0 +1,5 @@
+xpi:Depends=firefox | thunderbird (>= 3.0) | seamonkey (>= 2.0)
+xpi:Recommends=
+xpi:Breaks=firefox (>> 7.0~a0), seamonkey (<< 2.0), seamonkey (>> 2.4+), thunderbird (<< 3.0), thunderbird (>> 7.0~a1+)
+xpi:Enhances=firefox, seamonkey, thunderbird
+xpi:Provides=firefox-test-package, seamonkey-test-package, test-package, thunderbird-test-package
diff --git a/tests/dh_xul-ext/test b/tests/dh_xul-ext/test
new file mode 100755
index 0000000..fa98a77
--- /dev/null
+++ b/tests/dh_xul-ext/test
@@ -0,0 +1,78 @@
+#!/usr/bin/python
+
+# Copyright (c) 2011, Benjamin Drung <bdrung@debian.org>
+#
+# Permission to use, copy, modify, and/or distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+import os
+import sys
+import subprocess
+
+TESTS = ("all", "all_environment", "debian", "default-to-compatible", "ubuntu")
+
+class TestError(Exception):
+ pass
+
+def escape_arg(arg):
+ "Shell-escpae arg, if necessary"
+ if ' ' not in arg:
+ return arg
+ return '"%s"' % arg.replace('\\', r'\\').replace('"', r'\"')
+
+def fail(message):
+ print >> sys.stderr, "dh_xul-ext test error: " + message
+ sys.exit(1)
+
+def check_call(cmd, cwd=None):
+ return_code = subprocess.call(cmd, cwd=cwd)
+ if return_code != 0:
+ raise TestError("'" + " ".join(escape_arg(cmd)) + "' returned " +
+ str(return_code) + ".")
+
+def compare_files(file1, file2):
+ actual = open(file1).read().strip()
+ expected = open(file2).read().strip()
+ if actual != expected:
+ raise TestError("\033[91m Actual substvars files differs from expected file.\n"
+ "Expected content:\n" + expected + "\n" + \
+ "Actual content:\n" + actual + "\033[0m")
+
+def test_dh_xul_ext(test):
+ basedir = os.path.dirname(__file__)
+ testdir = os.path.join(basedir, test)
+ clean_cmd = ["fakeroot", "debian/rules", "clean"]
+ check_call(clean_cmd, cwd=testdir)
+ try:
+ cmd = ["fakeroot", "debian/rules", "install"]
+ check_call(cmd, cwd=testdir)
+ substvars = os.path.join(testdir, "debian",
+ "xul-ext-test-package.substvars")
+ expected = os.path.join(basedir, "expected_result", test + ".substvars")
+ compare_files(substvars, expected)
+ finally:
+ check_call(clean_cmd, cwd=testdir)
+
+def main():
+ errors = 0
+ for test in TESTS:
+ try:
+ test_dh_xul_ext(test)
+ except TestError, error:
+ errors += 1
+ print >> sys.stderr, "dh_xul-ext error in " + test + " test: " + \
+ str(error)
+ if errors > 0:
+ sys.exit(1)
+
+if __name__ == "__main__":
+ main()
diff --git a/tests/dh_xul-ext/ubuntu/debian/changelog b/tests/dh_xul-ext/ubuntu/debian/changelog
new file mode 100644
index 0000000..1b45ee9
--- /dev/null
+++ b/tests/dh_xul-ext/ubuntu/debian/changelog
@@ -0,0 +1,5 @@
+test-package (1.0-1) UNRELEASED; urgency=low
+
+ * Initial release.
+
+ -- Benjamin Drung <bdrung@debian.org> Sat, 09 Jul 2011 12:55:23 +0200
diff --git a/tests/dh_xul-ext/ubuntu/debian/compat b/tests/dh_xul-ext/ubuntu/debian/compat
new file mode 100644
index 0000000..7f8f011
--- /dev/null
+++ b/tests/dh_xul-ext/ubuntu/debian/compat
@@ -0,0 +1 @@
+7
diff --git a/tests/dh_xul-ext/ubuntu/debian/control b/tests/dh_xul-ext/ubuntu/debian/control
new file mode 100644
index 0000000..1aea594
--- /dev/null
+++ b/tests/dh_xul-ext/ubuntu/debian/control
@@ -0,0 +1,18 @@
+Source: test-package
+Section: web
+Priority: extra
+Maintainer: Ubuntu Mozilla Team <ubuntu-mozillateam@lists.ubuntu.com>
+Build-Depends: debhelper (>= 7.0.50~), mozilla-devscripts (>= 0.22~)
+Standards-Version: 3.9.2
+
+Package: xul-ext-test-package
+Architecture: all
+Depends: ${misc:Depends}, ${xpi:Depends}
+Recommends: ${xpi:Recommends}
+Provides: ${xpi:Provides}
+Enhances: ${xpi:Enhances}
+Breaks: ${xpi:Breaks}
+Description: mozilla-devscripts test package
+ This is a test package designed to test some scripts in mozilla-devscripts.
+ It is part of the mozilla-devscripts test suite and may do very odd things. It
+ should not be installed like a regular package. It may be an empty package.
diff --git a/tests/dh_xul-ext/ubuntu/debian/rules b/tests/dh_xul-ext/ubuntu/debian/rules
new file mode 100755
index 0000000..692843b
--- /dev/null
+++ b/tests/dh_xul-ext/ubuntu/debian/rules
@@ -0,0 +1,8 @@
+#!/usr/bin/make -f
+
+%:
+ dh $@
+
+override_dh_install:
+ dh_install install.rdf /usr/share/xul-ext/test-package/
+ DH_XUL_EXT_VENDOR=Ubuntu ../../../dh_xul-ext
diff --git a/tests/dh_xul-ext/ubuntu/install.rdf b/tests/dh_xul-ext/ubuntu/install.rdf
new file mode 100644
index 0000000..744c1df
--- /dev/null
+++ b/tests/dh_xul-ext/ubuntu/install.rdf
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:em="http://www.mozilla.org/2004/em-rdf#">
+ <Description about="urn:mozilla:install-manifest">
+ <em:id>{deadda7a-fee1-dead-coo1-d00ddeadc0de}</em:id>
+ <em:version>1.0</em:version>
+ <em:name>mozilla-devscripts test package</em:name>
+ <em:targetApplication>
+ <Description>
+ <!-- Firefox -->
+ <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
+ <em:minVersion>3.5</em:minVersion>
+ <em:maxVersion>7.0a</em:maxVersion>
+ </Description>
+ </em:targetApplication>
+ <em:targetApplication>
+ <Description>
+ <!-- Icedove/Thunderbird -->
+ <em:id>{3550f703-e582-4d05-9a08-453d09bdfdc6}</em:id>
+ <em:minVersion>3.0</em:minVersion>
+ <em:maxVersion>7.0a1</em:maxVersion>
+ </Description>
+ </em:targetApplication>
+ <em:targetApplication>
+ <Description>
+ <!-- Iceape/Seamonkey -->
+ <em:id>{92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}</em:id>
+ <em:minVersion>2.0</em:minVersion>
+ <em:maxVersion>2.4</em:maxVersion>
+ </Description>
+ </em:targetApplication>
+ <em:targetApplication>
+ <Description>
+ <!-- Conkeror -->
+ <em:id>{a79fe89b-6662-4ff4-8e88-09950ad4dfde}</em:id>
+ <em:minVersion>0.1</em:minVersion>
+ <em:maxVersion>100.*</em:maxVersion>
+ </Description>
+ </em:targetApplication>
+ </Description>
+</RDF>
diff --git a/tests/test-moz-version b/tests/test-moz-version
new file mode 100755
index 0000000..fc47ab6
--- /dev/null
+++ b/tests/test-moz-version
@@ -0,0 +1,105 @@
+#!/usr/bin/python
+
+# Copyright (c) 2010 Benjamin Drung <bdrung@debian.org>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+import getopt
+import os
+import sys
+
+sys.path.insert(1, os.path.abspath(os.path.dirname(sys.argv[0]) + "/.."))
+from moz_version import compare_versions
+
+# error codes
+COMMAND_LINE_SYNTAX_ERROR = 1
+TEST_FAILED_ERROR = 2
+
+TEST_PATTERN = (
+ ("1.-1", "lt", "1", True),
+ ("1", "eq", "1.", True),
+ ("1", "eq", "1.0", True),
+ ("1", "eq", "1.0.0", True),
+ ("1.0.0", "lt", "1.1a", True),
+ ("1.1a", "lt", "1.1aa", True),
+ ("1.1aa", "lt", "1.1ab", True),
+ ("1.1ab", "lt", "1.1b", True),
+ ("1.1b", "lt", "1.1c", True),
+ ("1.1pre", "eq", "1.1pre0", True),
+ ("1.1pre0", "eq", "1.0+", True),
+ ("1.0+", "lt", "1.1pre1a", True),
+ ("1.1pre1a", "lt", "1.1pre1aa", True),
+ ("1.1pre1aa", "lt", "1.1pre1b", True),
+ ("1.1pre1b", "lt", "1.1pre1", True),
+ ("1.1pre1", "lt", "1.1pre2", True),
+ ("1.1pre2", "lt", "1.1pre10", True),
+ ("1.1pre10", "lt", "1.1.-1", True),
+ ("1.1.-1", "lt", "1.1", True),
+ ("1.1", "eq", "1.1.0", True),
+ ("1.1.0", "eq", "1.1.00", True),
+ ("1.1.00", "lt", "1.10", True),
+ ("1.10", "lt", "1.*", True),
+ ("1.*", "lt", "1.*.1", True),
+ ("1.*.1", "lt", "2.0", True),
+ ("1.*.1", "gt", "2.0", False),
+)
+
+def fail(message):
+ print >> sys.stderr, "E: " + message
+ sys.exit(TEST_FAILED_ERROR)
+
+def test_compare(verbose=False):
+ for pattern in TEST_PATTERN:
+ compare_result = compare_versions(pattern[0], pattern[2], verbose)
+ if pattern[1] == "lt":
+ if (compare_result < 0) != pattern[3]:
+ fail('Test pattern "%s %s %s" failed (result should be %s).' % \
+ pattern)
+ elif pattern[1] == "eq":
+ if (compare_result == 0) != pattern[3]:
+ fail('Test pattern "%s %s %s" failed (result should be %s).' % \
+ pattern)
+ elif pattern[1] == "gt":
+ if (compare_result > 0) != pattern[3]:
+ fail('Test pattern "%s %s %s" failed (result should be %s).' % \
+ pattern)
+ else:
+ fail('Unknown pattern %s.' % (pattern[1]))
+
+def main():
+ try:
+ long_opts = ["verbose"]
+ opts = getopt.gnu_getopt(sys.argv[1:], "v", long_opts)[0]
+ except getopt.GetoptError, e:
+ # print help information and exit:
+ print >> sys.stderr, str(e)
+ sys.exit(COMMAND_LINE_SYNTAX_ERROR)
+
+ verbose = False
+
+ for o, _ in opts:
+ if o in ("-v", "--verbose"):
+ verbose = True
+ else:
+ assert False, "unhandled option"
+
+ test_compare(verbose)
+
+if __name__ == "__main__":
+ main()