[pacman-dev] [PATCH 11/11] test makepkg-template: Add update-version-with-newest-option

Florian Pritz bluewind at xinu.at
Sun Dec 21 15:11:29 UTC 2014


Signed-off-by: Florian Pritz <bluewind at xinu.at>
---
 .../update-version-with-newest-option/PKGBUILD           |  7 +++++++
 .../update-version-with-newest-option/arguments          |  1 +
 .../update-version-with-newest-option/expected_output    |  1 +
 .../update-version-with-newest-option/expected_result    | 16 ++++++++++++++++
 .../templates/perl-bla-1.2.template                      |  1 +
 .../templates/perl-bla.template                          |  1 +
 .../templates/perl-module-1.0.template                   |  6 ++++++
 .../templates/perl-module-1.1.template                   |  7 +++++++
 .../templates/perl-module.template                       |  1 +
 9 files changed, 41 insertions(+)
 create mode 100644 test/scripts/makepkg-template-tests/update-version-with-newest-option/PKGBUILD
 create mode 100644 test/scripts/makepkg-template-tests/update-version-with-newest-option/arguments
 create mode 100644 test/scripts/makepkg-template-tests/update-version-with-newest-option/expected_output
 create mode 100644 test/scripts/makepkg-template-tests/update-version-with-newest-option/expected_result
 create mode 100644 test/scripts/makepkg-template-tests/update-version-with-newest-option/templates/perl-bla-1.2.template
 create mode 120000 test/scripts/makepkg-template-tests/update-version-with-newest-option/templates/perl-bla.template
 create mode 100644 test/scripts/makepkg-template-tests/update-version-with-newest-option/templates/perl-module-1.0.template
 create mode 100644 test/scripts/makepkg-template-tests/update-version-with-newest-option/templates/perl-module-1.1.template
 create mode 120000 test/scripts/makepkg-template-tests/update-version-with-newest-option/templates/perl-module.template

diff --git a/test/scripts/makepkg-template-tests/update-version-with-newest-option/PKGBUILD b/test/scripts/makepkg-template-tests/update-version-with-newest-option/PKGBUILD
new file mode 100644
index 0000000..e1687cc
--- /dev/null
+++ b/test/scripts/makepkg-template-tests/update-version-with-newest-option/PKGBUILD
@@ -0,0 +1,7 @@
+pkgname=foo
+pkgver=1
+
+build() {
+# template start; name=perl-module; version=1.0
+# template end;
+}
diff --git a/test/scripts/makepkg-template-tests/update-version-with-newest-option/arguments b/test/scripts/makepkg-template-tests/update-version-with-newest-option/arguments
new file mode 100644
index 0000000..e85f5ed
--- /dev/null
+++ b/test/scripts/makepkg-template-tests/update-version-with-newest-option/arguments
@@ -0,0 +1 @@
+-n
\ No newline at end of file
diff --git a/test/scripts/makepkg-template-tests/update-version-with-newest-option/expected_output b/test/scripts/makepkg-template-tests/update-version-with-newest-option/expected_output
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/test/scripts/makepkg-template-tests/update-version-with-newest-option/expected_output
@@ -0,0 +1 @@
+0
diff --git a/test/scripts/makepkg-template-tests/update-version-with-newest-option/expected_result b/test/scripts/makepkg-template-tests/update-version-with-newest-option/expected_result
new file mode 100644
index 0000000..ea3bbe8
--- /dev/null
+++ b/test/scripts/makepkg-template-tests/update-version-with-newest-option/expected_result
@@ -0,0 +1,16 @@
+pkgname=foo
+pkgver=1
+
+build() {
+# template start; name=perl-module; version=1.1;
+echo "perl-module version 1.1"
+echo "before bla template"
+# template start; name=perl-bla; version=1.2;
+bla bla
+# template end;
+echo "after bla template"
+perl Makefile.pl
+make
+make install
+# template end;
+}
diff --git a/test/scripts/makepkg-template-tests/update-version-with-newest-option/templates/perl-bla-1.2.template b/test/scripts/makepkg-template-tests/update-version-with-newest-option/templates/perl-bla-1.2.template
new file mode 100644
index 0000000..b72e7d4
--- /dev/null
+++ b/test/scripts/makepkg-template-tests/update-version-with-newest-option/templates/perl-bla-1.2.template
@@ -0,0 +1 @@
+bla bla
diff --git a/test/scripts/makepkg-template-tests/update-version-with-newest-option/templates/perl-bla.template b/test/scripts/makepkg-template-tests/update-version-with-newest-option/templates/perl-bla.template
new file mode 120000
index 0000000..1161447
--- /dev/null
+++ b/test/scripts/makepkg-template-tests/update-version-with-newest-option/templates/perl-bla.template
@@ -0,0 +1 @@
+perl-bla-1.2.template
\ No newline at end of file
diff --git a/test/scripts/makepkg-template-tests/update-version-with-newest-option/templates/perl-module-1.0.template b/test/scripts/makepkg-template-tests/update-version-with-newest-option/templates/perl-module-1.0.template
new file mode 100644
index 0000000..415025a
--- /dev/null
+++ b/test/scripts/makepkg-template-tests/update-version-with-newest-option/templates/perl-module-1.0.template
@@ -0,0 +1,6 @@
+echo "before bla template"
+# template input; name=perl-bla
+echo "after bla template"
+perl Makefile.pl
+make
+make install
diff --git a/test/scripts/makepkg-template-tests/update-version-with-newest-option/templates/perl-module-1.1.template b/test/scripts/makepkg-template-tests/update-version-with-newest-option/templates/perl-module-1.1.template
new file mode 100644
index 0000000..5ad32c3
--- /dev/null
+++ b/test/scripts/makepkg-template-tests/update-version-with-newest-option/templates/perl-module-1.1.template
@@ -0,0 +1,7 @@
+echo "perl-module version 1.1"
+echo "before bla template"
+# template input; name=perl-bla
+echo "after bla template"
+perl Makefile.pl
+make
+make install
diff --git a/test/scripts/makepkg-template-tests/update-version-with-newest-option/templates/perl-module.template b/test/scripts/makepkg-template-tests/update-version-with-newest-option/templates/perl-module.template
new file mode 120000
index 0000000..f8618e4
--- /dev/null
+++ b/test/scripts/makepkg-template-tests/update-version-with-newest-option/templates/perl-module.template
@@ -0,0 +1 @@
+perl-module-1.1.template
\ No newline at end of file
-- 
2.2.1


More information about the pacman-dev mailing list