Make sure string tests for SF_STR_LICENSE actually works.

This commit is contained in:
Erik de Castro Lopo 2007-07-14 12:38:17 +10:00
parent 3d9e8c2eb5
commit 274bb817e5
4 changed files with 7 additions and 2 deletions

View File

@ -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

View File

@ -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 ;

View File

@ -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 "----------------------------------------------------------------------"

View File

@ -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) ;