summaryrefslogtreecommitdiffstats
path: root/libkcddb/test/utf8test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libkcddb/test/utf8test.cpp')
-rw-r--r--libkcddb/test/utf8test.cpp50
1 files changed, 50 insertions, 0 deletions
diff --git a/libkcddb/test/utf8test.cpp b/libkcddb/test/utf8test.cpp
new file mode 100644
index 00000000..05d8b83e
--- /dev/null
+++ b/libkcddb/test/utf8test.cpp
@@ -0,0 +1,50 @@
+#include <kapplication.h>
+#include <kcmdlineargs.h>
+#include <kdebug.h>
+
+#include "libkcddb/client.h"
+#include "libkcddb/cache.h"
+#include "libkcddb/lookup.h"
+
+ int
+main(int argc, char ** argv)
+{
+ KCmdLineArgs::init(argc, argv, "libkcddb_test", "", "", "");
+
+ KApplication app;
+
+ using namespace KCDDB;
+
+ Client c;
+
+ TrackOffsetList list;
+
+ list
+ << 150
+ << 61408
+ << 0
+ << 177675;
+
+ kdDebug() << "Stuff to send to server:" << endl;
+
+ kdDebug()
+ << CDDB::trackOffsetListToId(list)
+ << " "
+ //<< trackOffsetListToString(list)
+ << endl;
+
+ CDDB::Result r = c.lookup(list);
+
+ kdDebug() << "Client::lookup gave : " << CDDB::resultToString(r) << endl;
+
+ CDInfoList response = c.lookupResponse();
+
+ kdDebug() << "Client::lookup returned : " << response.count() << " entries"
+ << endl;
+
+ CDInfo i( c.bestLookupResponse() );
+
+ kdDebug() << "Best CDInfo had title: " << i.title << endl;
+
+ return 0;
+}