mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2026-01-11 23:25:57 +01:00
Resolved conflicts in 'ChangeLog'
This commit is contained in:
@@ -31,6 +31,7 @@ noinst_PROGRAMS = audio_convert_test\
|
||||
audio_import_test\
|
||||
audio_metadata_test\
|
||||
audio_peaks_test\
|
||||
cmdline_parser_test\
|
||||
datedecode_test\
|
||||
dateparse_test\
|
||||
db_charset_test\
|
||||
@@ -67,6 +68,9 @@ audio_metadata_test_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT4_LIBS@ @MUSICBRAINZ_LIB
|
||||
dist_audio_peaks_test_SOURCES = audio_peaks_test.cpp audio_peaks_test.h
|
||||
audio_peaks_test_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT4_LIBS@ @MUSICBRAINZ_LIBS@ -lQt3Support
|
||||
|
||||
dist_cmdline_parser_test_SOURCES = cmdline_parser_test.cpp cmdline_parser_test.h
|
||||
cmdline_parser_test_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT4_LIBS@ @MUSICBRAINZ_LIBS@ -lQt3Support
|
||||
|
||||
dist_datedecode_test_SOURCES = datedecode_test.cpp datedecode_test.h
|
||||
datedecode_test_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT4_LIBS@ @MUSICBRAINZ_LIBS@ -lQt3Support
|
||||
|
||||
|
||||
52
tests/cmdline_parser_test.cpp
Normal file
52
tests/cmdline_parser_test.cpp
Normal file
@@ -0,0 +1,52 @@
|
||||
// cmdline_parser_test.cpp
|
||||
//
|
||||
// Test the Rivendell command-line parser routines.
|
||||
//
|
||||
// (C) Copyright 2020 Fred Gleason <fredg@paravelsystems.com>
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License version 2 as
|
||||
// published by the Free Software Foundation.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public
|
||||
// License along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
//
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include <qapplication.h>
|
||||
|
||||
#include <rdcmd_switch.h>
|
||||
|
||||
#include "cmdline_parser_test.h"
|
||||
|
||||
MainObject::MainObject(QObject *parent)
|
||||
:QObject(parent)
|
||||
{
|
||||
//
|
||||
// Read Command Options
|
||||
//
|
||||
RDCmdSwitch *cmd=
|
||||
new RDCmdSwitch(qApp->argc(),qApp->argv(),"cmdline_parser_test",
|
||||
CMDLINE_PARSER_TEST_USAGE);
|
||||
for(unsigned i=0;i<cmd->keys();i++) {
|
||||
printf(" key[%d]: %s\n",i,cmd->key(i).utf8().constData());
|
||||
printf("value[%d]: %s\n",i,cmd->value(i).toUtf8().constData());
|
||||
}
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
||||
int main(int argc,char *argv[])
|
||||
{
|
||||
QApplication a(argc,argv,false);
|
||||
new MainObject();
|
||||
return a.exec();
|
||||
}
|
||||
35
tests/cmdline_parser_test.h
Normal file
35
tests/cmdline_parser_test.h
Normal file
@@ -0,0 +1,35 @@
|
||||
// cmdline_parser_test.h
|
||||
//
|
||||
// Test the Rivendell command-line parser routines.
|
||||
//
|
||||
// (C) Copyright 2020 Fred Gleason <fredg@paravelsystems.com>
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License version 2 as
|
||||
// published by the Free Software Foundation.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public
|
||||
// License along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
//
|
||||
|
||||
#ifndef CMDLINE_PARSER_TEST_H
|
||||
#define CMDLINE_PARSER_TEST_H
|
||||
|
||||
#include <qobject.h>
|
||||
|
||||
#define CMDLINE_PARSER_TEST_USAGE "<test-args> ...\n\n"
|
||||
|
||||
class MainObject : public QObject
|
||||
{
|
||||
public:
|
||||
MainObject(QObject *parent=0);
|
||||
};
|
||||
|
||||
|
||||
#endif // CMDLINE_PARSER_TEST_H
|
||||
Reference in New Issue
Block a user