summaryrefslogtreecommitdiff
path: root/tests/rpmmacro.at
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2008-11-22 11:22:01 +0200
committerPanu Matilainen <pmatilai@redhat.com>2008-11-22 11:22:01 +0200
commit1c57e1d337c00b475253c522461f689e911bc426 (patch)
treec208af248197caac9a255223cc599a5de207d39d /tests/rpmmacro.at
parenta5ff12cc192f7a2a4bf0506006b50f7452be4cab (diff)
downloadlibrpm-tizen-1c57e1d337c00b475253c522461f689e911bc426.tar.gz
librpm-tizen-1c57e1d337c00b475253c522461f689e911bc426.tar.bz2
librpm-tizen-1c57e1d337c00b475253c522461f689e911bc426.zip
Add some (trivial) macro evaluation tests
Diffstat (limited to 'tests/rpmmacro.at')
-rw-r--r--tests/rpmmacro.at39
1 files changed, 39 insertions, 0 deletions
diff --git a/tests/rpmmacro.at b/tests/rpmmacro.at
new file mode 100644
index 000000000..a39c3d50e
--- /dev/null
+++ b/tests/rpmmacro.at
@@ -0,0 +1,39 @@
+# rpmmacro.at: test rpm macros
+#
+
+# ------------------------------
+AT_SETUP([simple rpm --eval])
+AT_CHECK([
+run rpm --define "this that" --eval '%{this}'
+],
+[0],
+[that
+])
+AT_CLEANUP
+
+AT_SETUP([simple true conditional rpm --eval])
+AT_CHECK([
+run rpm --define "this that" --eval '%{?this}'
+],
+[0],
+[that
+])
+AT_CLEANUP
+
+AT_SETUP([simple false conditional rpm --eval])
+AT_CHECK([
+run rpm --define "this that" --eval '%{?that}'
+],
+[0],
+[
+])
+AT_CLEANUP
+
+AT_SETUP([simple lua --eval])
+AT_CHECK([
+run rpm --eval '%{lua:print(5*5)}'
+],
+[0],
+[25
+])
+AT_CLEANUP