From: Paul K. <pki...@us...> - 2005-12-17 21:57:30
|
Alex, test_octcdf.m with %! tests and nothing else isn't the correct way to write an independent test file. For one thing, it means you have to type "test test_octcdf" to use it, which is awkward. For another thing, test_octcdf shows up on the list of functions but it isn't one. The technique used for main/sparse is slightly better. There I wrote build_tests.sh which creates main/sparse/sptest.m with the following header: ## ## sptest ## ## run preset sparse tests. All should pass. function [passes,tests] = sptest disp('writing test output to sptest.log'); test('sptest','normal','sptest.log'); endfunction %!... Perhaps an even better solution is to create the file octcdf.test and modify admin/mktests.sh to include files with the .test extension. These should probably be installed as well, and the test suite should know to look for files with the extension .test so that we can type 'test octcdf'. Comments? - Paul On Dec 15, 2005, at 12:39 PM, alex wrote: > --- NEW FILE: test_octcdf.m --- > > > %!shared fname, nc > %! fname = [tmpnam '-octcdf.nc']; > %! nc = netcdf(fname,'c'); <snip> |