[pacman-dev] [PATCH v4 06/11] test makepkg-template: Add missing-template-file

Florian Pritz bluewind at xinu.at
Sun Dec 28 15:23:43 UTC 2014


Signed-off-by: Florian Pritz <bluewind at xinu.at>
---
 .../makepkg-template-tests/missing-template-file/PKGBUILD      |  7 +++++++
 .../missing-template-file/templates/perl-module.template       |  1 +
 .../missing-template-file/testcase-config                      | 10 ++++++++++
 3 files changed, 18 insertions(+)
 create mode 100644 test/scripts/makepkg-template-tests/missing-template-file/PKGBUILD
 create mode 120000 test/scripts/makepkg-template-tests/missing-template-file/templates/perl-module.template
 create mode 100644 test/scripts/makepkg-template-tests/missing-template-file/testcase-config

diff --git a/test/scripts/makepkg-template-tests/missing-template-file/PKGBUILD b/test/scripts/makepkg-template-tests/missing-template-file/PKGBUILD
new file mode 100644
index 0000000..dbfda1d
--- /dev/null
+++ b/test/scripts/makepkg-template-tests/missing-template-file/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/missing-template-file/templates/perl-module.template b/test/scripts/makepkg-template-tests/missing-template-file/templates/perl-module.template
new file mode 120000
index 0000000..8c2189a
--- /dev/null
+++ b/test/scripts/makepkg-template-tests/missing-template-file/templates/perl-module.template
@@ -0,0 +1 @@
+perl-module-1.0.template
\ No newline at end of file
diff --git a/test/scripts/makepkg-template-tests/missing-template-file/testcase-config b/test/scripts/makepkg-template-tests/missing-template-file/testcase-config
new file mode 100644
index 0000000..317e77b
--- /dev/null
+++ b/test/scripts/makepkg-template-tests/missing-template-file/testcase-config
@@ -0,0 +1,10 @@
+arguments+=()
+expected_exitcode=2
+
+# set IFS="" if you want trailing new lines, otherwise remove it
+IFS="" read -d '' expected_output <<'EOF'
+failed to open './makepkg-template-tests/missing-template-file/templates/perl-module-1.0.template': No such file or directory
+EOF
+
+IFS="" read -d '' expected_result <<'EOF'
+EOF
-- 
2.2.1


More information about the pacman-dev mailing list