Martchus
e095c7d87d
Fix check for comment of Matroska test file
2021-07-06 17:19:58 +02:00
Martchus
cef4dc0bb7
Apply clang-format
2021-07-06 16:38:52 +02:00
Jonas Kvinge
ea23d71e8a
Fix spelling and typos
2021-07-02 11:12:39 +02:00
Martchus
92e80a9286
Improve passing paths
...
* Use `std::string_view` instead of `const std::string &`
* Add overloads taking `std::string &&` for re-using existing strings
2021-04-23 22:16:43 +02:00
Martchus
0a041f6ad2
Fix warnings
2021-03-20 21:26:25 +01:00
Martchus
65597fd71e
Add API to allow aborting overall/expensive parsing functions
...
* Not really implemented within the various code paths of the parsers at
this point; this commit mainly adds the API.
* Adjust example in README
2021-02-04 23:21:50 +01:00
Martchus
8cd115c69d
Adapt tests to use KnownField::RecordDate instead of KnownField::Year
2021-02-01 17:22:57 +01:00
Martchus
64d98f5530
Use std::string_view where it makes sense
2021-01-30 21:53:06 +01:00
Martchus
6b469f1c26
Add Locale class to deal with differently specified languages/countries
...
Different media/tag formats specify languages and countries
differently. This change introduces a Locale class to keep track
of the format being used. So far there are no automatic conversions
implemented so it is entirely up to the user to pass valid values using
a format which matches the one required by the media/tag format.
This change also adds support for Matroska's IETF elements so at least the
raw value can be read, written and is preserved.
2020-12-16 17:48:08 +01:00
Martchus
965ee4ab4b
Adapt tests to recent changes
2020-04-26 22:22:29 +02:00
Martchus
eabc9c4438
Use 'override' in all TestFixture classes
2019-12-15 19:44:07 +01:00
Martchus
6e9b39726d
Add conversion from ISO-639-2/B codes to language names
2019-08-17 20:56:09 +02:00
Martchus
2725bad686
Add options for TagValue comparison
...
* Support case-insensitive comparision
* Allow ignoring meta-data
2019-08-12 20:24:27 +02:00
Martchus
c9e1dde70b
Adapt to changes in c++utilities
2019-06-12 20:40:45 +02:00
Martchus
5ad00a083c
Adapt to changes in c++utilities
2019-06-10 23:11:39 +02:00
Martchus
5114a3ea08
Treat differently encoded values not necessarily as different
...
That an automatic conversion happens for different types but not
for different encodings was always a bit odd.
This makes writing tests easier and comparing values within the
tag editor does not rely on choosing a particular encoding.
2019-06-01 23:01:53 +02:00
Martchus
c28ded1bca
Allow instantiating TagValue from TimeSpan and DateTime
2019-06-01 22:54:44 +02:00
Martchus
f042d216fd
Do not completely refuse on UTF-8 in ID3v1
...
since it is apparently used by some software.
But
* Write at least a BOM so it can be interpreted later
correctly as UTF-8
* Print a warning
* Keep proposing Latin-1
The tag editor should allow to configure which encoding
is used and whether the BOM is used and which encoding is
assumed when parsing a file.
2019-06-01 22:53:59 +02:00
Martchus
8c88298fe8
Fix TagValue::operator== if 0 byte contained
2019-06-01 12:33:24 +02:00
Martchus
73adf26401
Fix conversion from PositionInSet to integer
...
Even though there was already a test verifying that it is
not possible.
2019-06-01 12:18:05 +02:00
Martchus
b9bc756521
Adapt to workingCopyPathMode() removal
2019-05-11 19:01:16 +02:00
Martchus
7efa7a0d5a
Adapt to c++utilities v5
2019-05-04 16:04:21 +02:00
Martchus
296e5d11b6
Fix TagValue::toStandardGenreIndex() for empty genre index
2019-02-14 18:18:54 +01:00
Martchus
5140b76f08
Treat 255 as empty ID3v1 genre index
2019-02-13 18:56:03 +01:00
Martchus
da64d455d9
Let CMake generate code for test application
2019-01-13 22:28:26 +01:00
Martchus
438efdedbf
Use rmdir() rather than remove() to delete dir
2018-11-02 23:07:50 +01:00
Martchus
b7a5683211
Fix compiling tests for 32-bit
2018-11-01 23:25:33 +01:00
Martchus
969828e181
Fix compiling tests for Windows
2018-11-01 19:18:00 +01:00
Martchus
b955a6b79f
Fix compilation of tests under Linux
...
hopefully works now under Linux and Windows
2018-10-09 20:31:03 +02:00
Martchus
1c4f485b10
Fix compilation of test for Windows
2018-10-07 21:58:36 +02:00
Martchus
13bccb12f0
Enable all tests under Windows
...
Since workingCopyPath() has now been implemented under
Windows it is possible to enable the entire testsuite.
2018-10-07 21:58:15 +02:00
Martchus
6f2dcdc2d9
Fix leaking memory or file handles in StreamDataBlock descendants
...
StreamDataBlock needs a virtual d'tor since it is supposed to
be subclassed but the d'tor will be called on the base type.
The leaking file handles were observed by invoking the tests
with strace, eg.:
strace -e trace=file,close ./tagparser_tests
2018-08-11 23:12:12 +02:00
Martchus
a2ff0f418f
Fix typo occured -> occurred
2018-07-23 14:44:06 +02:00
Martchus
e75a8d25c5
Adjust values()/setValues() to handle multiple values per text frame
...
See https://github.com/Martchus/tagparser/issues/10
2018-07-12 12:34:38 +02:00
Martchus
a87ad5f5ec
Don't use global variable for backup directory
2018-07-12 12:34:38 +02:00
Martchus
1a97d91b27
Preserve multiple strings in ID3v2 text frames
2018-07-12 12:34:38 +02:00
Martchus
c71a497f2b
Don't generate testfiles during testrun
...
Instead, all additional files are generated in
download_testfiles.sh.
2018-07-11 12:02:30 +02:00
Martchus
f7ce79ca47
Don't check encoder version for test file generated with ffmpeg
2018-07-11 12:00:53 +02:00
Martchus
105d8ac83a
Test tagging recoding from Android camera app
2018-07-09 16:03:26 +02:00
Martchus
761b380c03
tests: Fix mkvmerge path
2018-07-09 15:37:48 +02:00
Martchus
f27dbd8934
Update documentation
2018-07-09 12:42:14 +02:00
Martchus
5b8ce47270
Use CPPUNIT_ASSERT_EQUAL in OverallTests::checkMp3TestMetaData()
2018-07-01 22:20:44 +02:00
Martchus
d64084ec78
Refactor formatting list of values
2018-07-01 22:11:34 +02:00
Martchus
943123afa1
Warn about ID3v2 text frame with multiple strings
...
First step to support multiple strings within ID3v2 text
frame.
See
* https://github.com/Martchus/tagparser/issues/10
* https://github.com/Martchus/tageditor/issues/38
2018-07-01 02:04:29 +02:00
Martchus
bfe8979812
Fix 2 refs in documentation
2018-06-03 21:00:49 +02:00
Martchus
b7d47cd374
Extend tests for utilities
2018-06-03 20:32:52 +02:00
Martchus
3c29430790
Extend TagValueTests to cover recent fixes
2018-06-03 19:20:02 +02:00
Martchus
60c757dcf6
Add c'tor overload to TagValue to prevent conversion to string
2018-06-03 19:04:48 +02:00
Martchus
b58eac9302
Use CPPUNIT_ASSERT_EQUAL in tests where possible
2018-04-30 19:00:22 +02:00
Martchus
0f0260fb77
Fix parseTags() for FLAC, consider tags unsupported if container unknown
...
FLAC stores tags on track level. Hence we must parse the
tracks here in order to parse the tags. This hasn't been taken
into account when refactoring the tag editor CLI leading to
https://github.com/Martchus/tageditor/issues/36 .
So let's handle these format specific details in the tagparser
library which will now internally parse tracks when calling
parseTags() on FLAC files.
This also fixes the weird behavior to consider tags supported
although the container format is unknown.
2018-04-29 17:18:17 +02:00