diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2011-07-30 16:51:01 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2011-07-30 16:51:01 +0300 |
commit | 004fd5299b3c24a1d11e6c450e5e763ea95779ad (patch) | |
tree | 3052034bd49efdb3fa84271e0eeccb6afc19e7cc | |
parent | 8006a1de47d492a2fc15e314a3851fb40e6622bd (diff) | |
download | idest-004fd5299b3c24a1d11e6c450e5e763ea95779ad.tar.gz idest-004fd5299b3c24a1d11e6c450e5e763ea95779ad.tar.bz2 |
Finish the testsuite.
* scheme/Makefile.am: Rewrite.
* src/frametab.gperf (frametab_enumerate): Minor fix.
* tests/Makefile.am (TESTSUITE_AT): Add new testcases.
(EXTRA_DIST): Add idest-32.png and idest-68.png.
* tests/testsuite.at: Add new testcases.
* tests/atlocal.in (GUILE_VERSION,INSTALL_PROG): New variables.
* tests/id3v2: Remove trailing whitespace from USLT.
* tests/delcomm.at: New file.
* tests/fmt-shortlist.at: New file.
* tests/framelist00.at: New file.
* tests/framelist01.at: New file.
* tests/framelist02.at: New file.
* tests/list1.at: New file.
* tests/list2.at: New file.
* tests/lyrics00.at: New file.
* tests/pic00.at: New file.
* tests/pic01.at: New file.
* tests/script00.at: New file.
* tests/script01.at: New file.
* tests/script02.at: New file.
* tests/script03.at: New file.
* tests/script04.at: New file.
* tests/script05.at: New file.
* tests/script06.at: New file.
* tests/script07.at: New file.
* tests/script08.at: New file.
* tests/setlyrics.at: New file.
* tests/setpic.at: New file.
* tests/settitle.at: New file.
* tests/shortlist.at: New file.
* tests/version.at: Remove useless prereq.
-rw-r--r-- | scheme/Makefile.am | 32 | ||||
-rw-r--r-- | src/frametab.gperf | 13 | ||||
-rw-r--r-- | tests/Makefile.am | 34 | ||||
-rw-r--r-- | tests/atlocal.in | 4 | ||||
-rw-r--r-- | tests/delcomm.at | 65 | ||||
-rw-r--r-- | tests/fmt-shortlist.at | 33 | ||||
-rw-r--r-- | tests/framelist00.at | 43 | ||||
-rw-r--r-- | tests/framelist01.at | 32 | ||||
-rw-r--r-- | tests/framelist02.at | 29 | ||||
-rw-r--r-- | tests/id3v2 | bin | 1953 -> 1953 bytes | |||
-rw-r--r-- | tests/list1.at | 64 | ||||
-rw-r--r-- | tests/list2.at | 40 | ||||
-rw-r--r-- | tests/lyrics00.at | 41 | ||||
-rw-r--r-- | tests/pic00.at | 47 | ||||
-rw-r--r-- | tests/pic01.at | 36 | ||||
-rw-r--r-- | tests/script00.at | 74 | ||||
-rw-r--r-- | tests/script01.at | 114 | ||||
-rw-r--r-- | tests/script02.at | 61 | ||||
-rw-r--r-- | tests/script03.at | 37 | ||||
-rw-r--r-- | tests/script04.at | 65 | ||||
-rw-r--r-- | tests/script05.at | 69 | ||||
-rw-r--r-- | tests/script06.at | 42 | ||||
-rw-r--r-- | tests/script07.at | 64 | ||||
-rw-r--r-- | tests/script08.at | 74 | ||||
-rw-r--r-- | tests/setlyrics.at | 55 | ||||
-rw-r--r-- | tests/setpic.at | 32 | ||||
-rw-r--r-- | tests/settitle.at | 31 | ||||
-rw-r--r-- | tests/shortlist.at | 33 | ||||
-rw-r--r-- | tests/testsuite.at | 35 | ||||
-rw-r--r-- | tests/version.at | 3 |
30 files changed, 1275 insertions, 27 deletions
diff --git a/scheme/Makefile.am b/scheme/Makefile.am index b8eefe7..028a649 100644 --- a/scheme/Makefile.am +++ b/scheme/Makefile.am | |||
@@ -14,26 +14,32 @@ | |||
14 | # You should have received a copy of the GNU General Public License | 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/>. | 15 | # along with Idest. If not, see <http://www.gnu.org/licenses/>. |
16 | 16 | ||
17 | EXTRA_DIST=\ | ||
18 | batch.scm\ | ||
19 | dry-run.scm\ | ||
20 | format.scm | ||
21 | |||
22 | sitedir = @GUILE_SITE@/$(PACKAGE) | 17 | sitedir = @GUILE_SITE@/$(PACKAGE) |
18 | moduledir = $(sitedir)/$(VERSION)/idest | ||
19 | formatdir = $(moduledir)/format | ||
20 | batchdir = $(moduledir)/batch | ||
23 | 21 | ||
24 | site_DATA=\ | 22 | site_DATA=\ |
25 | batch.scm\ | 23 | batch.scm\ |
26 | dry-run.scm\ | 24 | dry-run.scm\ |
27 | format.scm | 25 | format.scm |
28 | 26 | ||
29 | dist-hook: | 27 | module_DATA=\ |
30 | tar -C $(srcdir) -c -f - --exclude-vcs --exclude-backups idest | \ | 28 | idest/list-modules.scm\ |
31 | tar -C $(distdir) -x -f - | 29 | idest/load-module.scm |
30 | |||
31 | format_DATA=\ | ||
32 | idest/format/framelist.scm\ | ||
33 | idest/format/help.scm\ | ||
34 | idest/format/lyrics.scm\ | ||
35 | idest/format/pic.scm\ | ||
36 | idest/format/shortlist.scm | ||
37 | |||
38 | batch_DATA=\ | ||
39 | idest/batch/help.scm\ | ||
40 | idest/batch/setlyrics.scm\ | ||
41 | idest/batch/setpic.scm | ||
32 | 42 | ||
33 | versionsitedir = $(sitedir)/$(VERSION) | 43 | EXTRA_DIST = $(site_DATA) $(module_DATA) $(format_DATA) $(batch_DATA) |
34 | 44 | ||
35 | install-data-local: | ||
36 | test -d $(DESTDIR)/$(versionsitedir) || \ | ||
37 | $(INSTALL) -d $(DESTDIR)/$(versionsitedir) | ||
38 | tar -c -f - idest | (cd $(DESTDIR)/$(versionsitedir); tar -x -f -) | ||
39 | 45 | ||
diff --git a/src/frametab.gperf b/src/frametab.gperf index 15310c9..e716954 100644 --- a/src/frametab.gperf +++ b/src/frametab.gperf | |||
@@ -592,13 +592,15 @@ int | |||
592 | frametab_enumerate(int (*fun)(const struct idest_frametab *, void *), | 592 | frametab_enumerate(int (*fun)(const struct idest_frametab *, void *), |
593 | void *data, int sorted) | 593 | void *data, int sorted) |
594 | { | 594 | { |
595 | struct idest_frametab *ft; | 595 | struct idest_frametab const *ft; |
596 | struct idest_frametab *ftbuf = NULL; | ||
596 | int i; | 597 | int i; |
597 | 598 | ||
598 | if (sorted) { | 599 | if (sorted) { |
599 | ft = xmalloc(sizeof(wordlist)); | 600 | ftbuf = xmalloc(sizeof(wordlist)); |
600 | memcpy(ft, wordlist, sizeof(wordlist)); | 601 | memcpy(ftbuf, wordlist, sizeof(wordlist)); |
601 | qsort(ft, wordlist_count, sizeof(ft[0]), frametab_cmp); | 602 | qsort(ftbuf, wordlist_count, sizeof(ftbuf[0]), frametab_cmp); |
603 | ft = ftbuf; | ||
602 | } else | 604 | } else |
603 | ft = wordlist; | 605 | ft = wordlist; |
604 | for (i = 0; i < wordlist_count; i++) { | 606 | for (i = 0; i < wordlist_count; i++) { |
@@ -606,8 +608,7 @@ frametab_enumerate(int (*fun)(const struct idest_frametab *, void *), | |||
606 | if (rc) | 608 | if (rc) |
607 | return rc; | 609 | return rc; |
608 | } | 610 | } |
609 | if (sorted) | 611 | free(ftbuf); |
610 | free(ft); | ||
611 | return 0; | 612 | return 0; |
612 | } | 613 | } |
613 | 614 | ||
diff --git a/tests/Makefile.am b/tests/Makefile.am index 7b4f48e..d3082fd 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am | |||
@@ -20,7 +20,9 @@ EXTRA_DIST = \ | |||
20 | package.m4\ | 20 | package.m4\ |
21 | id3v1\ | 21 | id3v1\ |
22 | id3v1-2\ | 22 | id3v1-2\ |
23 | id3v2 | 23 | id3v2\ |
24 | idest-32.png\ | ||
25 | idest-68.png | ||
24 | 26 | ||
25 | DISTCLEANFILES = atconfig | 27 | DISTCLEANFILES = atconfig |
26 | MAINTAINERCLEANFILES = Makefile.in $(TESTSUITE) | 28 | MAINTAINERCLEANFILES = Makefile.in $(TESTSUITE) |
@@ -38,7 +40,6 @@ $(srcdir)/package.m4: $(top_srcdir)/configure.ac $(srcdir)/Makefile | |||
38 | echo 'm4_define([AT_PACKAGE_VERSION], [@PACKAGE_VERSION@])'; \ | 40 | echo 'm4_define([AT_PACKAGE_VERSION], [@PACKAGE_VERSION@])'; \ |
39 | echo 'm4_define([AT_PACKAGE_STRING], [@PACKAGE_STRING@])'; \ | 41 | echo 'm4_define([AT_PACKAGE_STRING], [@PACKAGE_STRING@])'; \ |
40 | echo 'm4_define([AT_PACKAGE_BUGREPORT], [@PACKAGE_BUGREPORT@])'; \ | 42 | echo 'm4_define([AT_PACKAGE_BUGREPORT], [@PACKAGE_BUGREPORT@])'; \ |
41 | echo 'm4_define([AT_PACKAGE_GUILE], [@GUILE_VERSION@])'; \ | ||
42 | } >$(srcdir)/package.m4 | 43 | } >$(srcdir)/package.m4 |
43 | 44 | ||
44 | # | 45 | # |
@@ -56,22 +57,45 @@ TESTSUITE_AT = \ | |||
56 | del-all-v12.at\ | 57 | del-all-v12.at\ |
57 | del-frame-v1.at\ | 58 | del-frame-v1.at\ |
58 | del-frame-v2.at\ | 59 | del-frame-v2.at\ |
59 | testsuite.at\ | 60 | delcomm.at\ |
60 | version.at\ | 61 | fmt-shortlist.at\ |
62 | framelist00.at\ | ||
63 | framelist01.at\ | ||
64 | framelist02.at\ | ||
65 | list1.at\ | ||
66 | list2.at\ | ||
67 | lyrics00.at\ | ||
61 | info-v1-00.at\ | 68 | info-v1-00.at\ |
62 | info-v2-00.at\ | 69 | info-v2-00.at\ |
63 | info-v12-00.at\ | 70 | info-v12-00.at\ |
71 | pic00.at\ | ||
72 | pic01.at\ | ||
64 | set-v1-00.at\ | 73 | set-v1-00.at\ |
65 | set-v1-01.at\ | 74 | set-v1-01.at\ |
66 | set-v2-00.at\ | 75 | set-v2-00.at\ |
67 | set-v2-01.at\ | 76 | set-v2-01.at\ |
77 | setlyrics.at\ | ||
78 | setpic.at\ | ||
79 | settitle.at\ | ||
80 | script00.at\ | ||
81 | script01.at\ | ||
82 | script02.at\ | ||
83 | script03.at\ | ||
84 | script04.at\ | ||
85 | script05.at\ | ||
86 | script06.at\ | ||
87 | script07.at\ | ||
88 | script08.at\ | ||
89 | shortlist.at\ | ||
90 | testsuite.at\ | ||
68 | query-v1-00.at\ | 91 | query-v1-00.at\ |
69 | query-v1-01.at\ | 92 | query-v1-01.at\ |
70 | query-v2-00.at\ | 93 | query-v2-00.at\ |
71 | query-v2-01.at\ | 94 | query-v2-01.at\ |
72 | query-v2-02.at\ | 95 | query-v2-02.at\ |
73 | query-v2-03.at\ | 96 | query-v2-03.at\ |
74 | query-v2-04.at | 97 | query-v2-04.at\ |
98 | version.at | ||
75 | 99 | ||
76 | TESTSUITE = $(srcdir)/testsuite | 100 | TESTSUITE = $(srcdir)/testsuite |
77 | M4=m4 | 101 | M4=m4 |
diff --git a/tests/atlocal.in b/tests/atlocal.in index 420c2c9..a302b99 100644 --- a/tests/atlocal.in +++ b/tests/atlocal.in | |||
@@ -8,3 +8,7 @@ XFAILFILE=$abs_builddir/.badversion | |||
8 | 8 | ||
9 | trap "cleanup; test -r $XFAILFILE && cat $XFAILFILE; exit $?" 1 2 13 15 | 9 | trap "cleanup; test -r $XFAILFILE && cat $XFAILFILE; exit $?" 1 2 13 15 |
10 | 10 | ||
11 | GUILE_VERSION="@GUILE_VERSION@" | ||
12 | INSTALL_PROG="@INSTALL@" | ||
13 | |||
14 | |||
diff --git a/tests/delcomm.at b/tests/delcomm.at new file mode 100644 index 0000000..f263061 --- /dev/null +++ b/tests/delcomm.at | |||
@@ -0,0 +1,65 @@ | |||
1 | # This file is part of idest -*- autotest -*- | ||
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 |