66 initTestSuite ;
77end
88
9-
109function test_removeDateSuffixBasic()
1110
1211 %% set up
1312 cfg.dir.output = fullfile(fileparts(mfilename(' fullpath' )), ' ..' , ' output' );
14-
13+
1514 % clean up
1615 if isdir(cfg .dir .output )
1716 rmdir(cfg .dir .output , ' s' );
1817 end
1918 [~ , ~ , ~ ] = mkdir(cfg .dir .output );
20-
19+
2120 % TODO
2221 % make sure we use the default date parameter (to implement?)
2322 % cfg = checkCFG(cfg);
@@ -30,7 +29,7 @@ function test_removeDateSuffixBasic()
3029 eventsName = ' test_events_date-202008050730.tsv' ;
3130 stimName = ' test_stim_date-202008050730.tsv' ;
3231 stimNameZipped = ' test2_stim_date-202008050730.tsv.gz' ;
33-
32+
3433 filesToProcess = { ...
3534 boldName ;
3635 boldName2 ;
@@ -46,12 +45,12 @@ function test_removeDateSuffixBasic()
4645 fullfile(' ..' , ' dummyData' , ' dummyData.nii.gz' ), ...
4746 fullfile(cfg .dir .output , filesToProcess{iFile }));
4847 end
49-
48+
5049 %% do stuff
5150 filenames = file_utils(' List' , cfg .dir .output , ' ^test.*$' );
5251
5352 removeDateSuffix(filenames , cfg .dir .output );
54-
53+
5554 %% expected data
5655 expectedBoldName = ' test_bold.nii.gz' ;
5756 expectedBoldName2 = ' test2_bold.nii.gz' ;
@@ -71,9 +70,3 @@ function test_removeDateSuffixBasic()
7170 assertEqual(exist(fullfile(cfg .dir .output , expectedBoldName ), ' file' ), 2 );
7271
7372end
74-
75-
76-
77-
78-
79-
0 commit comments