summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgeronimo <geronimo013@gmx.de>2012-07-30 16:14:03 (GMT)
committergeronimo <geronimo013@gmx.de>2012-07-30 16:14:03 (GMT)
commit881b190d7fea7ef2a56569760654b481f246cf9b (patch)
treed33bfccddd9c399dfec536ee9afadbf7bd386a6a
parentad667186c0c45cfca9d3f153faec7ce35545b238 (diff)
downloadcmp-881b190d7fea7ef2a56569760654b481f246cf9b.tar.gz
cmp-881b190d7fea7ef2a56569760654b481f246cf9b.tar.bz2
added test for linereader
-rw-r--r--tests/MetaScanTest/main.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/tests/MetaScanTest/main.cpp b/tests/MetaScanTest/main.cpp
index dcca444..8d21293 100644
--- a/tests/MetaScanTest/main.cpp
+++ b/tests/MetaScanTest/main.cpp
@@ -54,6 +54,17 @@ static void parseConfig(const char *FileName)
delete cr;
}
+static void dumpTextfile(const char *FileName)
+{
+ cLineReader *lr = new cLineReader(new cFileReader(new cFile(FileName)));
+ const char *line;
+
+ while ((line = lr->ReadLine())) {
+ std::cout << "line: " << line << std::endl;
+ }
+ delete lr;
+}
+
static void setupMediainfoReader(cMediainfoReader *mir)
{
mir->AddValuableKey("Format");
@@ -81,7 +92,7 @@ static void testMediaInfo(const char *FileName)
setupMediainfoReader(mir);
while ((ie = mir->ReadEntry())) {
std::cout << "media info - [" << std::get<0>(*ie) << "] ==> " << std::get<1>(*ie) << std::endl;
-// delete ie;
+ delete ie;
}
mir->Close();
delete mir;
@@ -197,7 +208,7 @@ void testPipe(const char *chk)
// ffmpeg -i ${media}
int main()
{
- parseConfig("srclient.conf");
+ dumpTextfile("srclient.conf");
std::cout << std::endl << "===========================================" << std::endl << std::endl;
parseConfig("srserver.conf");