mirror of
https://gitee.com/openharmony/third_party_libsnd
synced 2024-11-23 09:59:54 +00:00
Make sure string tests for SF_STR_LICENSE actually works.
This commit is contained in:
parent
3d9e8c2eb5
commit
274bb817e5
@ -3,6 +3,9 @@
|
||||
* src/FLAC
|
||||
Merge from FLAC upstream sources.
|
||||
|
||||
* src/strings.c tests/string_test.c tests/Makefile.am
|
||||
Make sure string tests for SF_STR_LICENSE actually works.
|
||||
|
||||
2007-07-13 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* tests/string_test.c
|
||||
|
@ -131,6 +131,7 @@ psf_store_string (SF_PRIVATE *psf, int str_type, const char *str)
|
||||
case SF_STR_COMMENT :
|
||||
case SF_STR_DATE :
|
||||
case SF_STR_ALBUM :
|
||||
case SF_STR_LICENSE :
|
||||
psf->strings [k].type = str_type ;
|
||||
psf->strings [k].str = psf->str_end ;
|
||||
psf->strings [k].flags = str_flags ;
|
||||
|
@ -395,6 +395,7 @@ sd2-tests: write_read_test
|
||||
|
||||
flac-tests: write_read_test
|
||||
./write_read_test flac
|
||||
./string_test flac
|
||||
@echo "----------------------------------------------------------------------"
|
||||
@echo " `./sfversion` passed tests on FLAC files."
|
||||
@echo "----------------------------------------------------------------------"
|
||||
|
@ -205,7 +205,7 @@ string_start_end_test (const char *filename, int typemajor)
|
||||
|
||||
if (typemajor != SF_FORMAT_WAV && typemajor != SF_FORMAT_AIFF)
|
||||
{ cptr = sf_get_string (file, SF_STR_LICENSE) ;
|
||||
if (cptr == NULL || strcmp (album, cptr) != 0)
|
||||
if (cptr == NULL || strcmp (license, cptr) != 0)
|
||||
{ if (errors++ == 0)
|
||||
puts ("\n") ;
|
||||
printf (" Bad license : %s\n", cptr) ;
|
||||
@ -327,7 +327,7 @@ string_start_test (const char *filename, int typemajor)
|
||||
|
||||
if (typemajor != SF_FORMAT_WAV && typemajor != SF_FORMAT_AIFF)
|
||||
{ cptr = sf_get_string (file, SF_STR_LICENSE) ;
|
||||
if (cptr == NULL || strcmp (album, cptr) != 0)
|
||||
if (cptr == NULL || strcmp (license, cptr) != 0)
|
||||
{ if (errors++ == 0)
|
||||
puts ("\n") ;
|
||||
printf (" Bad license : %s\n", cptr) ;
|
||||
|
Loading…
Reference in New Issue
Block a user