diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2011-07-29 14:33:27 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2011-07-29 14:33:27 +0300 |
commit | 8006a1de47d492a2fc15e314a3851fb40e6622bd (patch) | |
tree | 2d28aa3e671e5b5ccecc4ef0f2f60020d47e20e3 /tests/del-frame-v2.at | |
parent | 07e8fc8a6afe790f7e225601392cf6d17b6a3591 (diff) | |
download | idest-8006a1de47d492a2fc15e314a3851fb40e6622bd.tar.gz idest-8006a1de47d492a2fc15e314a3851fb40e6622bd.tar.bz2 |
Add more tests.
* src/idest.h (source_vopt): New extern.
(guess_file_tag_options): New proto.
* src/idop.c (parse_ed_items): Use only commas as
separators.
(set_tag_options,guess_file_tag_options): New function.
(find_matching_frame): Use the above functions.
(del_tags): make sure tag version remains unchanged,
unless requested so on the command line.
* src/main.c (source_vopt): New variable.
(main): Set source_vopt.
* tests/Makefile.am: Add new testcases.
* tests/testsuite.at: Add new testcases.
* tests/copy-v1-00.at: New testcase.
* tests/copy-v12-00.at: New testcase.
* tests/copy-v2-00.at: New testcase.
* tests/del-all-v1.at: New testcase.
* tests/del-all-v12.at: New testcase.
* tests/del-all-v2.at: New testcase.
* tests/del-frame-v1.at: New testcase.
* tests/del-frame-v2.at: New testcase.
* tests/set-v1-01.at: New testcase.
* tests/set-v2-01.at: New testcase.
Diffstat (limited to 'tests/del-frame-v2.at')
-rw-r--r-- | tests/del-frame-v2.at | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/tests/del-frame-v2.at b/tests/del-frame-v2.at new file mode 100644 index 0000000..49a5d0b --- /dev/null +++ b/tests/del-frame-v2.at @@ -0,0 +1,70 @@ +# 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([delete frame tags (v2)]) +AT_KEYWORDS([delete v2 del-frame del-frame-v2]) + +AT_CHECK([ +genfile -f file -p $abs_srcdir/id3v2 10k +off=`idest -i file | sed -n 's/length: //p'` +dd if=file of=file.orig bs=1 skip=$off 2>/dev/null +echo delete +idest -d -F TRCK,comment,WXXX:author,APIC:::'68x68 sample image' file +echo structure +idest -i file > struct +off=`sed -n 's/length: //p' struct` +sed 's/length: .*/length: X/' struct +echo all tags +idest -a file | sed 's/ *$//' +echo file data +dd if=file of=file.mod bs=1 skip=$off 2>/dev/null +cmp file.mod file.orig +], +[0], +[delete +structure +file: file +ntags: 1 +version: 2.4.0 +offset: 0 +length: X +all tags +TIT2: File +TALB: Idest Test Suite +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 +APIC:image/png:5:32x32 sample image: 89504E470D0A1A0A0000000D4948445200000020000000200806000000737A7AF4000000017352474200AECE1CE900000006624B474400FF00FF00FFA0BDA793000000097048597300000B1300000B1301009A9C180000000774494D4507DB071C093A2D7365CBF80000001974455874436F6D6D656E74004372656174656420776974682047494D5057810E17000000954944415458C3ED56D10A002108D3E8FF7F79F7D421125D696107FA16452E5D6E0C00141885826309003313339BF7AFAC40F55EB0FAE2AD1568C9019095CBFF226102D0D1FA6EF97E2F8F72122680049000AE96E3DE749B9D5B5229DD7EE0E4B07419125D21A90DF2CCE801653691169C911991EBE32D98EDF5F65FA0135AE5D8ED07BC04ADAB64EB116DD4822F12A6214900E1001E26BD48441311DC6B0000000049454E44AE426082 +file data +]) + +AT_CLEANUP + + |