aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2011-07-30 16:51:01 +0300
committerSergey Poznyakoff <gray@gnu.org.ua>2011-07-30 16:51:01 +0300
commit004fd5299b3c24a1d11e6c450e5e763ea95779ad (patch)
tree3052034bd49efdb3fa84271e0eeccb6afc19e7cc
parent8006a1de47d492a2fc15e314a3851fb40e6622bd (diff)
downloadidest-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.am32
-rw-r--r--src/frametab.gperf13
-rw-r--r--tests/Makefile.am34
-rw-r--r--tests/atlocal.in4
-rw-r--r--tests/delcomm.at65
-rw-r--r--tests/fmt-shortlist.at33
-rw-r--r--tests/framelist00.at43
-rw-r--r--tests/framelist01.at32
-rw-r--r--tests/framelist02.at29
-rw-r--r--tests/id3v2bin1953 -> 1953 bytes
-rw-r--r--tests/list1.at64
-rw-r--r--tests/list2.at40
-rw-r--r--tests/lyrics00.at41
-rw-r--r--tests/pic00.at47
-rw-r--r--tests/pic01.at36
-rw-r--r--tests/script00.at74
-rw-r--r--tests/script01.at114
-rw-r--r--tests/script02.at61
-rw-r--r--tests/script03.at37
-rw-r--r--tests/script04.at65
-rw-r--r--tests/script05.at69
-rw-r--r--tests/script06.at42
-rw-r--r--tests/script07.at64
-rw-r--r--tests/script08.at74
-rw-r--r--tests/setlyrics.at55
-rw-r--r--tests/setpic.at32
-rw-r--r--tests/settitle.at31
-rw-r--r--tests/shortlist.at33
-rw-r--r--tests/testsuite.at35
-rw-r--r--tests/version.at3
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
@@ -11,29 +11,35 @@
# 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 Idest. If not, see <http://www.gnu.org/licenses/>.
-EXTRA_DIST=\
- batch.scm\
- dry-run.scm\
- format.scm
-
sitedir = @GUILE_SITE@/$(PACKAGE)
+moduledir = $(sitedir)/$(VERSION)/idest
+formatdir = $(moduledir)/format
+batchdir = $(moduledir)/batch
site_DATA=\
batch.scm\
dry-run.scm\
format.scm
-dist-hook:
- tar -C $(srcdir) -c -f - --exclude-vcs --exclude-backups idest | \
- tar -C $(distdir) -x -f -
+module_DATA=\
+ idest/list-modules.scm\
+ idest/load-module.scm
+
+format_DATA=\
+ idest/format/framelist.scm\
+ idest/format/help.scm\
+ idest/format/lyrics.scm\
+ idest/format/pic.scm\
+ idest/format/shortlist.scm
+
+batch_DATA=\
+ idest/batch/help.scm\
+ idest/batch/setlyrics.scm\
+ idest/batch/setpic.scm
-versionsitedir = $(sitedir)/$(VERSION)
+EXTRA_DIST = $(site_DATA) $(module_DATA) $(format_DATA) $(batch_DATA)
-install-data-local:
- test -d $(DESTDIR)/$(versionsitedir) || \
- $(INSTALL) -d $(DESTDIR)/$(versionsitedir)
- tar -c -f - idest | (cd $(DESTDIR)/$(versionsitedir); tar -x -f -)
diff --git a/src/frametab.gperf b/src/frametab.gperf
index 15310c9..e716954 100644
--- a/src/frametab.gperf
+++ b/src/frametab.gperf
@@ -589,28 +589,29 @@ frametab_cmp(const void *a, const void *b)
}
int
frametab_enumerate(int (*fun)(const struct idest_frametab *, void *),
void *data, int sorted)
{
- struct idest_frametab *ft;
+ struct idest_frametab const *ft;
+ struct idest_frametab *ftbuf = NULL;
int i;
if (sorted) {
- ft = xmalloc(sizeof(wordlist));
- memcpy(ft, wordlist, sizeof(wordlist));
- qsort(ft, wordlist_count, sizeof(ft[0]), frametab_cmp);
+ ftbuf = xmalloc(sizeof(wordlist));
+ memcpy(ftbuf, wordlist, sizeof(wordlist));
+ qsort(ftbuf, wordlist_count, sizeof(ftbuf[0]), frametab_cmp);
+ ft = ftbuf;
} else
ft = wordlist;
for (i = 0; i < wordlist_count; i++) {
int rc = fun(ft + i, data);
if (rc)
return rc;
}
- if (sorted)
- free(ft);
+ free(ftbuf);
return 0;
}
/*
Local variables:
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 7b4f48e..d3082fd 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -17,13 +17,15 @@
EXTRA_DIST = \
$(TESTSUITE_AT)\
testsuite\
package.m4\
id3v1\
id3v1-2\
- id3v2
+ id3v2\
+ idest-32.png\
+ idest-68.png
DISTCLEANFILES = atconfig
MAINTAINERCLEANFILES = Makefile.in $(TESTSUITE)
## ------------ ##
@@ -35,13 +37,12 @@ $(srcdir)/package.m4: $(top_srcdir)/configure.ac $(srcdir)/Makefile
echo '# Signature of the current package.'; \
echo 'm4_define([AT_PACKAGE_NAME], [@PACKAGE_NAME@])'; \
echo 'm4_define([AT_PACKAGE_TARNAME], [@PACKAGE_TARNAME@])'; \
echo 'm4_define([AT_PACKAGE_VERSION], [@PACKAGE_VERSION@])'; \
echo 'm4_define([AT_PACKAGE_STRING], [@PACKAGE_STRING@])'; \
echo 'm4_define([AT_PACKAGE_BUGREPORT], [@PACKAGE_BUGREPORT@])'; \
- echo 'm4_define([AT_PACKAGE_GUILE], [@GUILE_VERSION@])'; \
} >$(srcdir)/package.m4
#
## ------------ ##
## Test suite. ##
@@ -53,28 +54,51 @@ TESTSUITE_AT = \
copy-v12-00.at\
del-all-v1.at\
del-all-v2.at\
del-all-v12.at\
del-frame-v1.at\
del-frame-v2.at\
- testsuite.at\
- version.at\
+ delcomm.at\
+ fmt-shortlist.at\
+ framelist00.at\
+ framelist01.at\
+ framelist02.at\
+ list1.at\
+ list2.at\
+ lyrics00.at\
info-v1-00.at\
info-v2-00.at\
info-v12-00.at\
+ pic00.at\
+ pic01.at\
set-v1-00.at\
set-v1-01.at\
set-v2-00.at\
set-v2-01.at\
+ setlyrics.at\
+ setpic.at\
+ settitle.at\
+ script00.at\
+ script01.at\
+ script02.at\
+ script03.at\
+ script04.at\
+ script05.at\
+ script06.at\
+ script07.at\
+ script08.at\
+ shortlist.at\
+ testsuite.at\
query-v1-00.at\
query-v1-01.at\
query-v2-00.at\
query-v2-01.at\
query-v2-02.at\
query-v2-03.at\
- query-v2-04.at
+ query-v2-04.at\
+ version.at
TESTSUITE = $(srcdir)/testsuite
M4=m4
AUTOTEST = $(AUTOM4TE) --language=autotest
$(TESTSUITE): package.m4 $(TESTSUITE_AT)
diff --git a/tests/atlocal.in b/tests/atlocal.in
index 420c2c9..a302b99 100644
--- a/tests/atlocal.in
+++ b/tests/atlocal.in
@@ -5,6 +5,10 @@
PATH=@abs_top_builddir@/src:$PATH
XFAILFILE=$abs_builddir/.badversion
trap "cleanup; test -r $XFAILFILE && cat $XFAILFILE; exit $?" 1 2 13 15
+GUILE_VERSION="@GUILE_VERSION@"
+INSTALL_PROG="@INSTALL@"
+
+
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 @@
+# This file is part of idest -*- autotest -*-
+# Copyright (C) 2011 Sergey Poznyakoff
+#
+# Idest is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# Idest 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 idest. If not, see <http://www.gnu.org/licenses/>.
+
+AT_SETUP([examples: delcomm])
+AT_KEYWORDS([script examples delcomm])
+
+AT_CHECK([
+PREREQ_GUILE
+genfile -f file1 -s $abs_srcdir/id3v1 10k
+genfile -f file2 -p $abs_srcdir/id3v2 10k
+
+idest -N -S $abs_top_srcdir/examples/delcomm.scm file1 file2
+echo file1
+idest -a file1
+echo file2
+idest -a file2
+],
+[0],
+[file1
+TIT2: File
+TPE1: Sergey Poznyakoff
+TALB: Idest Test Suite
+TDRC: 2011
+TRCK: 1
+TCON: Other
+file2
+TIT2: File
+TALB: Idest Test Suite
+TRCK: 1
+TPE1: Sergey Poznyakoff
+TDRC: 2011
+TCON: Sample headers
+TCOP: This file is part of Idest Copyright (C) 2009-2011 Sergey Poznyakoff Idest is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. Idest 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 Idest. If not, see <http://www.gnu.org/licenses/>.
+TENC: Idest
+USLT:eng:: IdEst is an ID3 Edit and Scripting Tool, a command line utility for
+manipulating ID3 tags. ID3 tag is a metadata container which supplies
+related information for a MP3 audio file. It allows information such
+as the title, artist, album, track number, etc. to be stored in the file
+itself.
+
+The idest utility allows to create new tags, and to view,
+modify or delete the existing ones. When compiled with Guile,
+IdEst allows you to write programs of arbitrary complexity for
+manipulating ID3 tags and to apply them to any number of files.
+WPUB: http://www.gnu.org.ua/software/idest
+WXXX:documentation: http://www.gnu.org.ua/software/idest/manual
+WXXX:author: http://gray.gnu.org.ua
+APIC:image/png:5:32x32 sample image: 89504E470D0A1A0A0000000D4948445200000020000000200806000000737A7AF4000000017352474200AECE1CE900000006624B474400FF00FF00FFA0BDA793000000097048597300000B1300000B1301009A9C180000000774494D4507DB071C093A2D7365CBF80000001974455874436F6D6D656E74004372656174656420776974682047494D5057810E17000000954944415458C3ED56D10A002108D3E8FF7F79F7D421125D696107FA16452E5D6E0C00141885826309003313339BF7AFAC40F55EB0FAE2AD1568C9019095CBFF226102D0D1FA6EF97E2F8F72122680049000AE96E3DE749B9D5B5229DD7EE0E4B07419125D21A90DF2CCE801653691169C911991EBE32D98EDF5F65FA0135AE5D8ED07BC04ADAB64EB116DD4822F12A6214900E1001E26BD48441311DC6B0000000049454E44AE426082
+APIC:image/png:0:68x68 sample image: 89504E470D0A1A0A0000000D4948445200000044000000440806000000381393B2000000017352474200AECE1CE900000006624B474400FF00FF00FFA0BDA793000000097048597300000B1300000B1301009A9C180000000774494D4507DB071C0A0032D982A62D0000001974455874436F6D6D656E74004372656174656420776974682047494D5057810E17000000FE4944415478DAEDDADB0E82300C005047F8FF5FAE6F8410196C949B397D3266A9DDB1EB345A22223E628A0101102040800001020408102040800001020408100104081020408000B923C6EC84A594E9F11B7F141CFF7573BDB53B32404E9C21F3B63C7AACF6E65AAEFBB57EB9A6A5CE316B03B5625BF3CC9FAF6DF4311DB2267EB4E0963CB5773922EE1BAAF3176B3D326B455FDD15A77E0EC93C8257CDAFD7DE32B54D6775D2F886CDD6D6651FA921B3D55B8BDB9A15A59443F92FEB90E514CF2A744F9E8CABBDD68D43668BF70CB688D8BC427B72F40ED9E27FAABECB0001020408102040800001020408102040800820408000010204081020401E1F5F46586895430352C20000000049454E44AE426082
+])
+
+AT_CLEANUP
diff --git a/tests/fmt-shortlist.at b/tests/fmt-shortlist.at
new file mode 100644
index 0000000..0f6b757
--- /dev/null
+++ b/tests/fmt-shortlist.at
@@ -0,0 +1,33 @@
+# This file is part of idest -*- autotest -*-
+# Copyright (C) 2011 Sergey Poznyakoff
+#
+# Idest is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# Idest 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 idest. If not, see <http://www.gnu.org/licenses/>.
+
+AT_SETUP([format: shortlist])
+AT_KEYWORDS([script format shortlist])
+
+AT_CHECK([
+PREREQ_GUILE
+
+genfile -f file1 -s $abs_srcdir/id3v1 10k
+genfile -f file2 -p $abs_srcdir/id3v2 10k
+
+idest -N -p $abs_top_srcdir/scheme --format shortlist file1 file2
+],
+[0],
+[file1: File by Sergey Poznyakoff, 2011
+file2: File by Sergey Poznyakoff, 2011
+])
+
+AT_CLEANUP
diff --git a/tests/framelist00.at b/tests/framelist00.at
new file mode 100644
index 0000000..894d0f0
--- /dev/null
+++ b/tests/framelist00.at
@@ -0,0 +1,43 @@
+# This file is part of idest -*- autotest -*-
+# Copyright (C) 2011 Sergey Poznyakoff
+#
+# Idest is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# Idest 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 idest. If not, see <http://www.gnu.org/licenses/>.
+
+AT_SETUP([formats: framelist --full])
+AT_KEYWORDS([script format framelist--full framelist00])
+
+AT_CHECK([
+PREREQ_GUILE
+genfile -f file -p $abs_srcdir/id3v2 10k
+idest -N -p $abs_top_srcdir/scheme --format framelist --full file
+],
+[0],
+[TIT2 descr="Title/songname/content description"
+TALB descr="Album/movie/show title"
+TRCK descr="Track number/position in set"
+COMM descr="Comments" lang="eng" condesc=""
+TPE1 descr="Lead performer(s)/soloist(s)"
+TDRC descr="Recording time"
+TCON descr="Content type"
+TCOP descr="Copyright message"
+TENC descr="Encoded by"
+USLT descr="Unsynchronised lyric/text transcription" lang="eng" condesc=""
+WPUB descr="Publishers official webpage"
+WXXX descr="User defined URL link frame" condesc="documentation"
+WXXX descr="User defined URL link frame" condesc="author"
+APIC descr="Attached picture" mime-type="image/png" pic-type="5" condesc="32x32 sample image"
+APIC descr="Attached picture" mime-type="image/png" pic-type="0" condesc="68x68 sample image"
+])
+
+AT_CLEANUP
diff --git a/tests/framelist01.at b/tests/framelist01.at
new file mode 100644
index 0000000..59e5ca2
--- /dev/null
+++ b/tests/framelist01.at
@@ -0,0 +1,32 @@
+# This file is part of idest -*- autotest -*-
+# Copyright (C) 2011 Sergey Poznyakoff
+#
+# Idest is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# Idest 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 idest. If not, see <http://www.gnu.org/licenses/>.
+
+AT_SETUP([formats: framelist --frames])
+AT_KEYWORDS([script format framelist--frames framelist01])
+
+AT_CHECK([
+PREREQ_GUILE
+genfile -f file -p $abs_srcdir/id3v2 10k
+idest -N -p $abs_top_srcdir/scheme --format framelist --frames TIT2,COMM,APIC file
+],
+[0],
+[TIT2
+COMM
+APIC
+APIC
+])
+
+AT_CLEANUP
diff --git a/tests/framelist02.at b/tests/framelist02.at
new file mode 100644
index 0000000..c56d11e
--- /dev/null
+++ b/tests/framelist02.at
@@ -0,0 +1,29 @@
+# This file is part of idest -*- autotest -*-
+# Copyright (C) 2011 Sergey Poznyakoff
+#
+# Idest is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# Idest 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 idest. If not, see <http://www.gnu.org/licenses/>.
+
+AT_SETUP([formats: framelist --single-line])
+AT_KEYWORDS([script format framelist--single-line framelist02])
+
+AT_CHECK([
+PREREQ_GUILE
+genfile -f file -p $abs_srcdir/id3v2 10k
+idest -N -p $abs_top_srcdir/scheme --format framelist --single-line file
+],
+[0],
+[TIT2,TALB,TRCK,COMM,TPE1,TDRC,TCON,TCOP,TENC,USLT,WPUB,WXXX,WXXX,APIC,APIC
+])
+
+AT_CLEANUP
diff --git a/tests/id3v2 b/tests/id3v2
index 64a228e..2ad4c71 100644
--- a/tests/id3v2
+++ b/tests/id3v2
Binary files differ
diff --git a/tests/list1.at b/tests/list1.at
new file mode 100644
index 0000000..80d869b
--- /dev/null
+++ b/tests/list1.at
@@ -0,0 +1,64 @@
+# This file is part of idest -*- autotest -*-
+# Copyright (C) 2011 Sergey Poznyakoff
+#
+# Idest is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# Idest 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 idest. If not, see <http://www.gnu.org/licenses/>.
+
+AT_SETUP([examples: list1])
+AT_KEYWORDS([script examples list1])
+
+AT_CHECK([
+PREREQ_GUILE
+
+genfile -f file1 -s $abs_srcdir/id3v1 10k
+genfile -f file2 -p $abs_srcdir/id3v2 10k
+
+idest -N -S $abs_top_srcdir/examples/list1.scm file1 file2
+],
+[0],
+[file1
+(TIT2 (descr . Title/songname/content description) (text . File))
+(TPE1 (descr . Lead performer(s)/soloist(s)) (text . Sergey Poznyakoff))
+(TALB (descr . Album/movie/show title) (text . Idest Test Suite))
+(TDRC (descr . Recording time) (text . 2011))
+(TRCK (descr . Track number/position in set) (text . 1))
+(TCON (descr . Content type) (text . Other))
+(COMM (descr . Comments) (text . Sample ID3 headers for idest) (lang . XXX) (condesc . ))
+file2
+(TIT2 (descr . Title/songname/content description) (text . File))
+(TALB (descr . Album/movie/show title) (text . Idest Test Suite))
+(TRCK (descr . Track number/position in set) (text . 1))
+(COMM (descr . Comments) (text . Sample ID3 headers for idest testsuite) (lang . eng) (condesc . ))
+(TPE1 (descr . Lead performer(s)/soloist(s)) (text . Sergey Poznyakoff))
+(TDRC (descr . Recording time) (text . 2011))
+(TCON (descr . Content type) (text . Sample headers))
+(TCOP (descr . Copyright message) (text . This file is part of Idest Copyright (C) 2009-2011 Sergey Poznyakoff Idest is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. Idest 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 Idest. If not, see <http://www.gnu.org/licenses/>.))
+(TENC (descr . Encoded by) (text . Idest))
+(USLT (descr . Unsynchronised lyric/text transcription) (text . IdEst is an ID3 Edit and Scripting Tool, a command line utility for
+manipulating ID3 tags. ID3 tag is a metadata container which supplies
+related information for a MP3 audio file. It allows information such
+as the title, artist, album, track number, etc. to be stored in the file
+itself.
+
+The idest utility allows to create new tags, and to view,
+modify or delete the existing ones. When compiled with Guile,
+IdEst allows you to write programs of arbitrary complexity for
+manipulating ID3 tags and to apply them to any number of files.) (lang . eng) (condesc . ))
+(WPUB (descr . Publishers official webpage) (text . http://www.gnu.org.ua/software/idest))
+(WXXX (descr . User defined URL link frame) (text . http://www.gnu.org.ua/software/idest/manual) (condesc . documentation))
+(WXXX (descr . User defined URL link frame) (text . http://gray.gnu.org.ua) (condesc . author))
+(APIC (descr . Attached picture) (text . 89504E470D0A1A0A0000000D4948445200000020000000200806000000737A7AF4000000017352474200AECE1CE900000006624B474400FF00FF00FFA0BDA793000000097048597300000B1300000B1301009A9C180000000774494D4507DB071C093A2D7365CBF80000001974455874436F6D6D656E74004372656174656420776974682047494D5057810E17000000954944415458C3ED56D10A002108D3E8FF7F79F7D421125D696107FA16452E5D6E0C00141885826309003313339BF7AFAC40F55EB0FAE2AD1568C9019095CBFF226102D0D1FA6EF97E2F8F72122680049000AE96E3DE749B9D5B5229DD7EE0E4B07419125D21A90DF2CCE801653691169C911991EBE32D98EDF5F65FA0135AE5D8ED07BC04ADAB64EB116DD4822F12A6214900E1001E26BD48441311DC6B0000000049454E44AE426082) (mime-type . image/png) (pic-type . 5) (condesc . 32x32 sample image))
+(APIC (descr . Attached picture) (text . 89504E470D0A1A0A0000000D4948445200000044000000440806000000381393B2000000017352474200AECE1CE900000006624B474400FF00FF00FFA0BDA793000000097048597300000B1300000B1301009A9C180000000774494D4507DB071C0A0032D982A62D0000001974455874436F6D6D656E74004372656174656420776974682047494D5057810E17000000FE4944415478DAEDDADB0E82300C005047F8FF5FAE6F8410196C949B397D3266A9DDB1EB345A22223E628A0101102040800001020408102040800001020408100104081020408000B923C6EC84A594E9F11B7F141CFF7573BDB53B32404E9C21F3B63C7AACF6E65AAEFBB57EB9A6A5CE316B03B5625BF3CC9FAF6DF4311DB2267EB4E0963CB5773922EE1BAAF3176B3D326B455FDD15A77E0EC93C8257CDAFD7DE32B54D6775D2F886CDD6D6651FA921B3D55B8BDB9A15A59443F92FEB90E514CF2A744F9E8CABBDD68D43668BF70CB688D8BC427B72F40ED9E27FAABECB0001020408102040800001020408102040800820408000010204081020401E1F5F46586895430352C20000000049454E44AE426082) (mime-type . image/png) (pic-type . 0) (condesc . 68x68 sample image))
+])
+
+AT_CLEANUP
diff --git a/tests/list2.at b/tests/list2.at
new file mode 100644
index 0000000..73008c6
--- /dev/null
+++ b/tests/list2.at
@@ -0,0 +1,40 @@
+# This file is part of idest -*- autotest -*-
+# Copyright (C) 2011 Sergey Poznyakoff
+#
+# Idest is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# Idest 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 idest. If not, see <http://www.gnu.org/licenses/>.
+
+AT_SETUP([examples: list2])
+AT_KEYWORDS([script examples list2])
+
+AT_CHECK([
+PREREQ_GUILE
+
+genfile -f file1 -s $abs_srcdir/id3v1 10k
+genfile -f file2 -p $abs_srcdir/id3v2 10k
+
+idest -N -S $abs_top_srcdir/examples/list2.scm TIT2,TALB,COMM,TENC file1 file2
+],
+[0],
+[file1
+(TIT2 (descr . Title/songname/content description) (text . File))
+(TALB (descr . Album/movie/show title) (text . Idest Test Suite))
+(COMM (descr . Comments) (text . Sample ID3 headers for idest) (lang . XXX) (condesc . ))
+file2
+(TIT2 (descr . Title/songname/content description) (text . File))
+(TALB (descr . Album/movie/show title) (text . Idest Test Suite))
+(COMM (descr . Comments) (text . Sample ID3 headers for idest testsuite) (lang . eng) (condesc . ))
+(TENC (descr . Encoded by) (text . Idest))
+])
+
+AT_CLEANUP
diff --git a/tests/lyrics00.at b/tests/lyrics00.at
new file mode 100644
index 0000000..0eefe05
--- /dev/null
+++ b/tests/lyrics00.at
@@ -0,0 +1,41 @@
+# This file is part of idest -*- autotest -*-
+# Copyright (C) 2011 Sergey Poznyakoff
+#
+# Idest is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# Idest 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 idest. If not, see <http://www.gnu.org/licenses/>.
+
+AT_SETUP([formats: lyrics])
+AT_KEYWORDS([script format lyrics lyrics00])
+
+AT_CHECK([
+PREREQ_GUILE
+genfile -f file -p $abs_srcdir/id3v2 10k
+unset PAGER
+idest -N -p $abs_top_srcdir/scheme --format lyrics file
+],
+[0],
+[File
+
+IdEst is an ID3 Edit and Scripting Tool, a command line utility for
+manipulating ID3 tags. ID3 tag is a metadata container which supplies
+related information for a MP3 audio file. It allows information such
+as the title, artist, album, track number, etc. to be stored in the file
+itself.
+
+The idest utility allows to create new tags, and to view,
+modify or delete the existing ones. When compiled with Guile,
+IdEst allows you to write programs of arbitrary complexity for
+manipulating ID3 tags and to apply them to any number of files.
+])
+
+AT_CLEANUP
diff --git a/tests/pic00.at b/tests/pic00.at
new file mode 100644
index 0000000..f81a52c
--- /dev/null
+++ b/tests/pic00.at
@@ -0,0 +1,47 @@
+# This file is part of idest -*- autotest -*-
+# Copyright (C) 2011 Sergey Poznyakoff
+#
+# Idest is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# Idest 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 idest. If not, see <http://www.gnu.org/licenses/>.
+
+AT_SETUP([formats: pic --help])
+AT_KEYWORDS([script format pic--help pic00])
+
+AT_CHECK([
+PREREQ_GUILE
+idest -N -p $abs_top_srcdir/scheme --format pic --help
+],
+[0],
+[usage: idest --format=pic [[OPTIONS]] FILE...
+displays attached picture(s) or stores them on disc
+OPTIONS are:
+ -v, --viewer PROG use PROG to view images (default: xv)
+ -d, --description STR look for picture with this description
+ -m, --mime-type TYPE picture must have this MIME type
+ -s, --store store picture on disk, don't show it
+ -f, --file FILE save picture to FILE (implies --store)
+
+FILE is a format string and can contain the following meta-sequences:
+
+Sequence Expands to
+---------+-----------------------------
+ ~D Input file directory part
+ ~N Input file base name
+ ~C Content description
+ ~T Mime type without the "image/" prefix
+ ~P Picture type
+ ~I PID
+
+])
+
+AT_CLEANUP
diff --git a/tests/pic01.at b/tests/pic01.at
new file mode 100644
index 0000000..4c01c32
--- /dev/null
+++ b/tests/pic01.at
@@ -0,0 +1,36 @@
+# This file is part of idest -*- autotest -*-
+# Copyright (C) 2011 Sergey Poznyakoff
+#
+# Idest is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# Idest 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 idest. If not, see <http://www.gnu.org/licenses/>.
+
+AT_SETUP([formats: pic --store])
+AT_KEYWORDS([script format pic--store pic01])
+
+AT_CHECK([
+PREREQ_GUILE
+genfile -f file -p $abs_srcdir/id3v2 10k
+idest -N -p $abs_top_srcdir/scheme --format pic --store --file ~N-~C.~T file
+echo file-32x32 sample image.png
+cmp "file-32x32 sample image.png" $abs_srcdir/idest-32.png
+echo file-68x68 sample image.png
+cmp "file-68x68 sample image.png" $abs_srcdir/idest-68.png
+],
+[0],
+[Saving file-32x32 sample image.png
+Saving file-68x68 sample image.png
+file-32x32 sample image.png
+file-68x68 sample image.png
+])
+
+AT_CLEANUP
diff --git a/tests/script00.at b/tests/script00.at
new file mode 100644
index 0000000..402e158
--- /dev/null
+++ b/tests/script00.at
@@ -0,0 +1,74 @@
+# This file is part of idest -*- autotest -*-
+# Copyright (C) 2011 Sergey Poznyakoff
+#
+# Idest is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# Idest 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 idest. If not, see <http://www.gnu.org/licenses/>.
+
+AT_SETUP([basic scripting])
+AT_KEYWORDS([script script00])
+
+AT_DATA([framelist.scm],[
+(define (idest-main name frames)
+ (display name)
+ (newline)
+ (for-each
+ (lambda (frame)
+ (display frame)
+ (newline))
+ frames))
+])
+
+AT_CHECK([
+PREREQ_GUILE
+genfile -f file1 -s $abs_srcdir/id3v1 10k
+genfile -f file2 -p $abs_srcdir/id3v2 10k
+
+idest -N -S ./framelist.scm file1 file2
+],
+[0],
+[file1
+(TIT2 (descr . Title/songname/content description) (text . File))
+(TPE1 (descr . Lead performer(s)/soloist(s)) (text . Sergey Poznyakoff))
+(TALB (descr . Album/movie/show title) (text . Idest Test Suite))
+(TDRC (descr . Recording time) (text . 2011))
+(TRCK (descr . Track number/position in set) (text . 1))
+(TCON (descr . Content type) (text . Other))
+(COMM (descr . Comments) (text . Sample ID3 headers for idest) (lang . XXX) (condesc . ))
+file2
+(TIT2 (descr . Title/songname/content description) (text . File))
+(TALB (descr . Album/movie/show title) (text . Idest Test Suite))
+(TRCK (descr . Track number/position in set) (text . 1))
+(COMM (descr . Comments) (text . Sample ID3 headers for idest testsuite) (lang . eng) (condesc . ))
+(TPE1 (descr . Lead performer(s)/soloist(s)) (text . Sergey Poznyakoff))
+(TDRC (descr . Recording time) (text . 2011))
+(TCON (descr . Content type) (text . Sample headers))
+(TCOP (descr . Copyright message) (text . This file is part of Idest Copyright (C) 2009-2011 Sergey Poznyakoff Idest is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3