Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/test/scripts/makepkg-template-tests/last-template-dir-has-precedece
diff options
context:
space:
mode:
Diffstat (limited to 'test/scripts/makepkg-template-tests/last-template-dir-has-precedece')
-rw-r--r--test/scripts/makepkg-template-tests/last-template-dir-has-precedece/PKGBUILD4
-rw-r--r--test/scripts/makepkg-template-tests/last-template-dir-has-precedece/PKGBUILD.expanded6
-rw-r--r--test/scripts/makepkg-template-tests/last-template-dir-has-precedece/templates/first/perl-module-1.0.template1
-rw-r--r--test/scripts/makepkg-template-tests/last-template-dir-has-precedece/templates/last/perl-module-1.0.template1
-rw-r--r--test/scripts/makepkg-template-tests/last-template-dir-has-precedece/testcase-config15
5 files changed, 27 insertions, 0 deletions
diff --git a/test/scripts/makepkg-template-tests/last-template-dir-has-precedece/PKGBUILD b/test/scripts/makepkg-template-tests/last-template-dir-has-precedece/PKGBUILD
new file mode 100644
index 00000000..2813b757
--- /dev/null
+++ b/test/scripts/makepkg-template-tests/last-template-dir-has-precedece/PKGBUILD
@@ -0,0 +1,4 @@
+pkgname=foo
+pkgver=1
+
+# template input; name=perl-module; version=1.0;
diff --git a/test/scripts/makepkg-template-tests/last-template-dir-has-precedece/PKGBUILD.expanded b/test/scripts/makepkg-template-tests/last-template-dir-has-precedece/PKGBUILD.expanded
new file mode 100644
index 00000000..c1dbeb4a
--- /dev/null
+++ b/test/scripts/makepkg-template-tests/last-template-dir-has-precedece/PKGBUILD.expanded
@@ -0,0 +1,6 @@
+pkgname=foo
+pkgver=1
+
+# template start; name=perl-module; version=1.0;
+this should be included
+# template end;
diff --git a/test/scripts/makepkg-template-tests/last-template-dir-has-precedece/templates/first/perl-module-1.0.template b/test/scripts/makepkg-template-tests/last-template-dir-has-precedece/templates/first/perl-module-1.0.template
new file mode 100644
index 00000000..2649f782
--- /dev/null
+++ b/test/scripts/makepkg-template-tests/last-template-dir-has-precedece/templates/first/perl-module-1.0.template
@@ -0,0 +1 @@
+this should be overwritten
diff --git a/test/scripts/makepkg-template-tests/last-template-dir-has-precedece/templates/last/perl-module-1.0.template b/test/scripts/makepkg-template-tests/last-template-dir-has-precedece/templates/last/perl-module-1.0.template
new file mode 100644
index 00000000..409e8d43
--- /dev/null
+++ b/test/scripts/makepkg-template-tests/last-template-dir-has-precedece/templates/last/perl-module-1.0.template
@@ -0,0 +1 @@
+this should be included
diff --git a/test/scripts/makepkg-template-tests/last-template-dir-has-precedece/testcase-config b/test/scripts/makepkg-template-tests/last-template-dir-has-precedece/testcase-config
new file mode 100644
index 00000000..fe38d659
--- /dev/null
+++ b/test/scripts/makepkg-template-tests/last-template-dir-has-precedece/testcase-config
@@ -0,0 +1,15 @@
+arguments+=(--template-dir $testdir/$testcase/templates/first)
+arguments+=(--template-dir $testdir/$testcase/templates/last)
+expected_exitcode=0
+
+IFS="" read -d '' expected_output <<'EOF'
+EOF
+
+IFS="" read -d '' expected_result <<'EOF'
+pkgname=foo
+pkgver=1
+
+# template start; name=perl-module; version=1.0;
+this should be included
+# template end;
+EOF