Add some (trivial) macro evaluation tests
This commit is contained in:
parent
a5ff12cc19
commit
1c57e1d337
|
@ -22,6 +22,7 @@ TESTSUITE_AT += rpmi.at
|
|||
TESTSUITE_AT += rpmvercmp.at
|
||||
TESTSUITE_AT += rpmconflict.at
|
||||
TESTSUITE_AT += rpmconfig.at
|
||||
TESTSUITE_AT += rpmmacro.at
|
||||
EXTRA_DIST += $(TESTSUITE_AT)
|
||||
|
||||
## testsuite data
|
||||
|
|
|
@ -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
|
|
@ -6,3 +6,4 @@ m4_include([rpmbuild.at])
|
|||
m4_include([rpmvercmp.at])
|
||||
m4_include([rpmconflict.at])
|
||||
m4_include([rpmconfig.at])
|
||||
m4_include([rpmmacro.at])
|
||||
|
|
Loading…
Reference in New Issue