aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am2
-rw-r--r--configure.ac5
-rw-r--r--src/Makefile.am1
-rw-r--r--src/cmdline.opt2
-rw-r--r--src/frametab.gperf4
-rw-r--r--src/getopt.m42
-rw-r--r--src/guile.c5
-rw-r--r--src/main.c1
-rw-r--r--tests/.gitignore7
-rw-r--r--tests/Makefile.am95
-rw-r--r--tests/atlocal.in10
-rw-r--r--tests/genfile.c128
-rw-r--r--tests/id3v1bin0 -> 128 bytes
-rw-r--r--tests/id3v1-2bin0 -> 2081 bytes
-rw-r--r--tests/id3v2bin0 -> 1953 bytes
-rw-r--r--tests/idest-32.pngbin0 -> 314 bytes
-rw-r--r--tests/idest-68.pngbin0 -> 419 bytes
-rw-r--r--tests/info-v1-00.at33
-rw-r--r--tests/info-v12-00.at36
-rw-r--r--tests/info-v2-00.at33
-rw-r--r--tests/query-v1-00.at35
-rw-r--r--tests/query-v1-01.at31
-rw-r--r--tests/query-v2-00.at35
-rw-r--r--tests/query-v2-01.at31
-rw-r--r--tests/query-v2-02.at31
-rw-r--r--tests/query-v2-03.at34
-rw-r--r--tests/query-v2-04.at52
-rw-r--r--tests/set-v1-00.at52
-rw-r--r--tests/set-v2-00.at69
-rw-r--r--tests/testsuite.at42
-rw-r--r--tests/version.at34
31 files changed, 802 insertions, 8 deletions
diff --git a/Makefile.am b/Makefile.am
index e19d967..dd2c846 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -20,7 +20,7 @@ if IDEST_COND_GUILE
20 SCHEME_DIR = scheme 20 SCHEME_DIR = scheme
21endif 21endif
22 22
23SUBDIRS=gnu libid3tag gint src doc examples $(SCHEME_DIR) 23SUBDIRS=gnu libid3tag gint src doc examples $(SCHEME_DIR) tests
24 24
25.PHONY: ChangeLog 25.PHONY: ChangeLog
26ChangeLog: 26ChangeLog:
diff --git a/configure.ac b/configure.ac
index 772ea62..296ae0e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -64,6 +64,11 @@ EOF
64], 64],
65[status_guile=$status_guile]) 65[status_guile=$status_guile])
66 66
67# Initialize the test suite.
68AC_CONFIG_TESTDIR(tests)
69AC_CONFIG_FILES([tests/Makefile tests/atlocal])
70AM_MISSING_PROG([AUTOM4TE], [autom4te])
71
67AC_CONFIG_FILES([Makefile 72AC_CONFIG_FILES([Makefile
68 gnu/Makefile 73 gnu/Makefile
69 gint/Makefile 74 gint/Makefile
diff --git a/src/Makefile.am b/src/Makefile.am
index 1cd02d8..bd06dbf 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -15,6 +15,7 @@
15# along with Idest. If not, see <http://www.gnu.org/licenses/>. 15# along with Idest. If not, see <http://www.gnu.org/licenses/>.
16 16
17bin_PROGRAMS=idest 17bin_PROGRAMS=idest
18
18idest_SOURCES=\ 19idest_SOURCES=\
19 backup.c\ 20 backup.c\
20 editem.c\ 21 editem.c\
diff --git a/src/cmdline.opt b/src/cmdline.opt
index c43d285..9ed798f 100644
--- a/src/cmdline.opt
+++ b/src/cmdline.opt
@@ -246,7 +246,7 @@ get_options(int argc, char *argv[])
246 if (optind < argc && mode == MODE_MOD) { 246 if (optind < argc && mode == MODE_MOD) {
247 char *p; 247 char *p;
248 /* See if we've been given any assignment arguments */ 248 /* See if we've been given any assignment arguments */
249 while (p = strchr(argv[optind], '=')) { 249 while (argv[optind] && (p = strchr(argv[optind], '='))) {
250 *p++ = 0; 250 *p++ = 0;
251 input_list_add_assignment(argv[optind++], p); 251 input_list_add_assignment(argv[optind++], p);
252 } 252 }
diff --git a/src/frametab.gperf b/src/frametab.gperf
index dd4acd2..15310c9 100644
--- a/src/frametab.gperf
+++ b/src/frametab.gperf
@@ -22,8 +22,8 @@
22#define DQ(name) static char *QID(name)[] 22#define DQ(name) static char *QID(name)[]
23 23
24DQ(COMM) = { "lang", "condesc" }; 24DQ(COMM) = { "lang", "condesc" };
25DQ(TXXX) = { "descr" }; 25DQ(TXXX) = { "condesc" };
26DQ(WXXX) = { "descr" }; 26DQ(WXXX) = { "condesc" };
27DQ(APIC) = { "mime-type", "pic-type", "condesc" }; 27DQ(APIC) = { "mime-type", "pic-type", "condesc" };
28 28
29#define QUAL(name) sizeof(QID(name))/sizeof(QID(name)[0]), QID(name) 29#define QUAL(name) sizeof(QID(name))/sizeof(QID(name)[0]), QID(name)
diff --git a/src/getopt.m4 b/src/getopt.m4
index 19ee33c..9267de2 100644
--- a/src/getopt.m4
+++ b/src/getopt.m4
@@ -496,7 +496,7 @@ define([<OPTIONS_BEGIN>],
496 [<divert(-1) 496 [<divert(-1)
497 define([<GETOPT_STYLE>],[<$1>]) 497 define([<GETOPT_STYLE>],[<$1>])
498 ifelse([<$1>],[<gnu>], 498 ifelse([<$1>],[<gnu>],
499 [<STDFUNC([<$2 " (" PACKAGE_STRING ")">], [<$2>], [<$3>], [<$4>])>]) 499 [<STDFUNC([<$2 " (" PACKAGE_NAME ") " PACKAGE_VERSION>], [<$2>], [<$3>], [<$4>])>])
500>]) 500>])
501 501
502define([<OPTIONS_END>],[< 502define([<OPTIONS_END>],[<
diff --git a/src/guile.c b/src/guile.c
index 901d398..d3ceade 100644
--- a/src/guile.c
+++ b/src/guile.c
@@ -23,7 +23,6 @@
23int no_init_files_option; 23int no_init_files_option;
24int guile_inited = 0; 24int guile_inited = 0;
25int guile_debug = 1; 25int guile_debug = 1;
26char **guile_argv;
27 26
28SCM_GLOBAL_VARIABLE_INIT(sym_idest_main, "idest-main", SCM_EOL); 27SCM_GLOBAL_VARIABLE_INIT(sym_idest_main, "idest-main", SCM_EOL);
29SCM_GLOBAL_VARIABLE_INIT(sym_idest_readonly, "idest-readonly", SCM_BOOL_T); 28SCM_GLOBAL_VARIABLE_INIT(sym_idest_readonly, "idest-readonly", SCM_BOOL_T);
@@ -720,12 +719,12 @@ guile_list(const char *file, struct id3_tag *tag)
720} 719}
721 720
722void 721void
723guile_init(int *pargc, char **pargv) 722guile_init(int *pargc, char ***pargv)
724{ 723{
725} 724}
726 725
727void 726void
728guile_add_load_path(const char *arg) 727guile_add_load_path(const char *arg, int li)
729{ 728{
730} 729}
731 730
diff --git a/src/main.c b/src/main.c
index e3a82df..54a987d 100644
--- a/src/main.c
+++ b/src/main.c
@@ -32,6 +32,7 @@ struct id3_tag *source_tag;
32 32
33char *format_name; 33char *format_name;
34char *batch_name; 34char *batch_name;
35char **guile_argv;
35 36
36 37
37struct item_info { 38struct item_info {
diff --git a/tests/.gitignore b/tests/.gitignore
new file mode 100644
index 0000000..11f17b8
--- /dev/null
+++ b/tests/.gitignore
@@ -0,0 +1,7 @@
1atconfig
2atlocal
3genfile
4package.m4
5testsuite
6testsuite.dir
7testsuite.log
diff --git a/tests/Makefile.am b/tests/Makefile.am
new file mode 100644
index 0000000..4463d13
--- /dev/null
+++ b/tests/Makefile.am
@@ -0,0 +1,95 @@
1# This file is part of idest
2# Copyright (C) 2011 Sergey Poznyakoff
3#
4# Idest is free software; you can redistribute it and/or modify
5# it under the terms of the GNU General Public License as published by
6# the Free Software Foundation; either version 3, or (at your option)
7# any later version.
8#
9# Idest is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY; without even the implied warranty of
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12# GNU General Public License for more details.
13#
14# You should have received a copy of the GNU General Public License
15# along with idest. If not, see <http://www.gnu.org/licenses/>.
16
17EXTRA_DIST = \
18 $(TESTSUITE_AT)\
19 testsuite\
20 package.m4\
21 id3v1\
22 id3v1-2\
23 id3v2
24
25DISTCLEANFILES = atconfig
26MAINTAINERCLEANFILES = Makefile.in $(TESTSUITE)
27
28
29## ------------ ##
30## package.m4. ##
31## ------------ ##
32
33$(srcdir)/package.m4: $(top_srcdir)/configure.ac $(srcdir)/Makefile
34 $(AM_V_GEN){ \
35 echo '# Signature of the current package.'; \
36 echo 'm4_define([AT_PACKAGE_NAME], [@PACKAGE_NAME@])'; \
37 echo 'm4_define([AT_PACKAGE_TARNAME], [@PACKAGE_TARNAME@])'; \
38 echo 'm4_define([AT_PACKAGE_VERSION], [@PACKAGE_VERSION@])'; \
39 echo 'm4_define([AT_PACKAGE_STRING], [@PACKAGE_STRING@])'; \
40 echo 'm4_define([AT_PACKAGE_BUGREPORT], [@PACKAGE_BUGREPORT@])'; \
41 echo 'm4_define([AT_PACKAGE_GUILE], [@GUILE_VERSION@])'; \
42 } >$(srcdir)/package.m4
43
44#
45
46## ------------ ##
47## Test suite. ##
48## ------------ ##
49
50TESTSUITE_AT = \
51 testsuite.at\
52 version.at\
53 info-v1-00.at\
54 info-v2-00.at\
55 info-v12-00.at\
56 set-v1-00.at\
57 set-v2-00.at\
58 query-v1-00.at\
59 query-v1-01.at\
60 query-v2-00.at\
61 query-v2-01.at\
62 query-v2-02.at\
63 query-v2-03.at\
64 query-v2-04.at
65
66TESTSUITE = $(srcdir)/testsuite
67M4=m4
68
69AUTOTEST = $(AUTOM4TE) --language=autotest
70$(TESTSUITE): package.m4 $(TESTSUITE_AT)
71 $(AUTOTEST) -I $(srcdir) testsuite.at -o $@.tmp
72 mv $@.tmp $@