summaryrefslogtreecommitdiff
path: root/test/rpmver.cc
diff options
context:
space:
mode:
Diffstat (limited to 'test/rpmver.cc')
-rw-r--r--test/rpmver.cc18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/rpmver.cc b/test/rpmver.cc
new file mode 100644
index 000000000..be982603b
--- /dev/null
+++ b/test/rpmver.cc
@@ -0,0 +1,18 @@
+#include <apt-pkg/debversion.h>
+#include <rpm/rpmio.h>
+#include <rpm/misc.h>
+#include <stdlib.h>
+
+int main(int argc,const char *argv[])
+{
+ printf("'%s' <> '%s': ",argv[1],argv[2]);
+ printf("rpm: %i deb: %i\n",rpmvercmp(argv[1],argv[2]),
+ debVS.CmpFragment(argv[1],argv[1]+strlen(argv[1]),
+ argv[2],argv[2]+strlen(argv[2])));
+
+ printf("'%s' <> '%s': ",argv[2],argv[1]);
+ printf("rpm: %i deb: %i\n",rpmvercmp(argv[2],argv[1]),
+ debVS.CmpFragment(argv[2],argv[2]+strlen(argv[2]),
+ argv[1],argv[1]+strlen(argv[1])));
+ return 0;
+}