diff options
author | Josh Coalson <jcoalson@users.sourceforce.net> | 2006-11-21 06:39:14 +0000 |
---|---|---|
committer | Josh Coalson <jcoalson@users.sourceforce.net> | 2006-11-21 06:39:14 +0000 |
commit | a196a663090720ca0f154e63805968fd4ddf03f6 (patch) | |
tree | f3bd23c2df41262e4d451c47c77999110a230caf /src/test_libFLAC/metadata_manip.c | |
parent | 2beca730030c03121edc533e56e3544e08894789 (diff) | |
download | flac-a196a663090720ca0f154e63805968fd4ddf03f6.tar.gz |
fix bug where test would fail if libFLAC not built with ogg support
Diffstat (limited to 'src/test_libFLAC/metadata_manip.c')
-rw-r--r-- | src/test_libFLAC/metadata_manip.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/test_libFLAC/metadata_manip.c b/src/test_libFLAC/metadata_manip.c index 8d6b4a83..6a1cc52c 100644 --- a/src/test_libFLAC/metadata_manip.c +++ b/src/test_libFLAC/metadata_manip.c @@ -22,6 +22,7 @@ #include <stdio.h> #include <stdlib.h> /* for malloc() */ +#include <string.h> /* for memcpy()/memset() */ #if defined _MSC_VER || defined __MINGW32__ #include <sys/utime.h> /* for utime() */ #include <io.h> /* for chmod() */ @@ -2111,15 +2112,17 @@ FLAC__bool test_metadata_file_manipulation() if(!test_level_2_misc_(/*is_ogg=*/false)) return false; - if(!test_level_2_(/*filename_based=*/true, /*is_ogg=*/true)) /* filename-based */ - return false; - if(!test_level_2_(/*filename_based=*/false, /*is_ogg=*/true)) /* callback-based */ - return false; + if(FLAC_API_SUPPORTS_OGG_FLAC) { + if(!test_level_2_(/*filename_based=*/true, /*is_ogg=*/true)) /* filename-based */ + return false; + if(!test_level_2_(/*filename_based=*/false, /*is_ogg=*/true)) /* callback-based */ + return false; #if 0 - /* when ogg flac write is supported, will have to add this: */ - if(!test_level_2_misc_(/*is_ogg=*/true)) - return false; + /* when ogg flac write is supported, will have to add this: */ + if(!test_level_2_misc_(/*is_ogg=*/true)) + return false; #endif + } return true; } |