src/sndfile.c: Fix seekable regression

This was broken as an unintended side-effect of 19e12f564.

Also add a test to tests/write_read_test.tpl.
This commit is contained in:
Erik de Castro Lopo 2015-12-01 20:45:55 +11:00
parent bb6cd875af
commit 776308d728
2 changed files with 5 additions and 1 deletions

View File

@ -3003,7 +3003,6 @@ psf_open_file (SF_PRIVATE *psf, SF_INFO *sfinfo)
} ;
sfinfo->sections = 0 ;
sfinfo->seekable = 0 ;
return (SNDFILE *) psf ;

View File

@ -565,6 +565,11 @@ mono_[+ (get "type_name") +]_test (const char *filename, int format, int long_fi
exit (1) ;
} ;
if (sfinfo.seekable != 1)
{ printf ("\n\nLine %d : File should be seekable.\n", __LINE__) ;
exit (1) ;
} ;
check_log_buffer_or_die (file, __LINE__) ;
test_read_[+ (get "data_type") +]_or_die (file, 0, test, items, __LINE__) ;