From 8997cc9cfca46c31d20a8e91372d63536f19ef0c Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 19 Dec 2024 09:08:31 +0100 Subject: add rpmexpand, rpmexpandnumeric to retrieve rpm macro value add rpmdefine to set rpm macro value --- tests/015-rpmmacro.phpt | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 tests/015-rpmmacro.phpt (limited to 'tests') diff --git a/tests/015-rpmmacro.phpt b/tests/015-rpmmacro.phpt new file mode 100644 index 0000000..13a92e1 --- /dev/null +++ b/tests/015-rpmmacro.phpt @@ -0,0 +1,25 @@ +--TEST-- +Check for rpmdefine, rpmexpand, rpmexpandnumeric +--SKIPIF-- + +--FILE-- + 0); + +$name = "_my_test_macro_for_rpminfo_"; +$val = __FILE__; +var_dump(rpmexpand("%$name") === "%$name" ); +var_dump(rpmdefine("$name $val")); +var_dump(rpmexpand("%$name") === __FILE__); +?> +--EXPECT-- +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) + -- cgit