From dfe289850f068f19ba4a83ab4e7e22a7e09c13c9 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Sat, 26 Jan 2013 13:17:21 -0600 Subject: Rename a number of libraries and executables to avoid conflicts with KDE4 --- tdewallet/backend/tests/backendtest.cpp | 45 +++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 tdewallet/backend/tests/backendtest.cpp (limited to 'tdewallet/backend/tests/backendtest.cpp') diff --git a/tdewallet/backend/tests/backendtest.cpp b/tdewallet/backend/tests/backendtest.cpp new file mode 100644 index 000000000..4e19ce43f --- /dev/null +++ b/tdewallet/backend/tests/backendtest.cpp @@ -0,0 +1,45 @@ +#include +#include + +#include +#include + +#include "tdewalletbackend.h" + +int main(int argc, char **argv) { + TDEApplication a(argc, argv, "tdewalletbackendtest"); + + KWallet::Backend be("ktestwallet"); + printf("KWalletBackend constructed\n"); + + TQByteArray apass, bpass, cpass; + + apass.duplicate("apassword", 9); + bpass.duplicate("bpassword", 9); + cpass.duplicate("cpassword", 9); + + printf("Passwords initialised.\n"); + int rc = be.close(apass); + + printf("be.close(apass) returned %d (should be -255)\n", rc); + + rc = be.open(bpass); + + printf("be.open(bpass) returned %d (should be 0 or 1)\n", rc); + + rc = be.close(bpass); + + printf("be.close(bpass) returned %d (should be 0)\n", rc); + + rc = be.open(apass); + + printf("be.open(apass) returned %d (should be negative)\n", rc); + + rc = be.open(bpass); + + printf("be.open(bpass) returned %d (should be 0)\n", rc); + + return 0; +} + + -- cgit v1.2.1