summaryrefslogtreecommitdiffstats
path: root/test/scripts
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2014-12-21 15:48:57 +0100
committerAllan McRae <allan@archlinux.org>2015-01-11 09:58:25 +0100
commitbd2473797e634723e1406315c37e1bed72595267 (patch)
tree195ee0e333b8aab48533250c1c0f7cee221bc385 /test/scripts
parent6201f6e5acca08268d6a019a72b76c1318d4dbd5 (diff)
downloadpacman-bd2473797e634723e1406315c37e1bed72595267.tar.gz
pacman-bd2473797e634723e1406315c37e1bed72595267.tar.xz
test makepkg-template: Add name-charset-valid
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'test/scripts')
-rw-r--r--test/scripts/makepkg-template-tests/name-charset-valid/PKGBUILD8
-rw-r--r--test/scripts/makepkg-template-tests/name-charset-valid/templates/foo@-_.+a-1.template1
-rw-r--r--test/scripts/makepkg-template-tests/name-charset-valid/testcase-config19
3 files changed, 28 insertions, 0 deletions
diff --git a/test/scripts/makepkg-template-tests/name-charset-valid/PKGBUILD b/test/scripts/makepkg-template-tests/name-charset-valid/PKGBUILD
new file mode 100644
index 00000000..ec21cdb4
--- /dev/null
+++ b/test/scripts/makepkg-template-tests/name-charset-valid/PKGBUILD
@@ -0,0 +1,8 @@
+pkgname=foo
+pkgver=1
+
+build() {
+# template start; name=foo@-_.+a
+make install
+# template end;
+}
diff --git a/test/scripts/makepkg-template-tests/name-charset-valid/templates/foo@-_.+a-1.template b/test/scripts/makepkg-template-tests/name-charset-valid/templates/foo@-_.+a-1.template
new file mode 100644
index 00000000..d0884a6c
--- /dev/null
+++ b/test/scripts/makepkg-template-tests/name-charset-valid/templates/foo@-_.+a-1.template
@@ -0,0 +1 @@
+42 cookies
diff --git a/test/scripts/makepkg-template-tests/name-charset-valid/testcase-config b/test/scripts/makepkg-template-tests/name-charset-valid/testcase-config
new file mode 100644
index 00000000..409444a9
--- /dev/null
+++ b/test/scripts/makepkg-template-tests/name-charset-valid/testcase-config
@@ -0,0 +1,19 @@
+arguments+=()
+expected_exitcode=0
+
+_setup_testcase() {
+ ln -sr "templates/"{foo\@-_.+a-1.template,foo\@-_.+a.template}
+}
+IFS="" read -d '' expected_output <<'EOF'
+EOF
+
+IFS="" read -d '' expected_result <<'EOF'
+pkgname=foo
+pkgver=1
+
+build() {
+# template start; name=foo@-_.+a; version=1;
+42 cookies
+# template end;
+}
+EOF