Skip to content

Commit de3d381

Browse files
committed
fix tests
1 parent 8c6de6a commit de3d381

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

src/utils/identify_sources.m

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,4 @@
118118

119119
end
120120

121-
function bf = shorten_prefix(bf, len)
122-
bf.prefix = bf.prefix((len + 1):end);
123-
end
121+

src/utils/update_prefix.m

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,7 @@
5454
end
5555

5656
end
57+
58+
function bf = shorten_prefix(bf, len)
59+
bf.prefix = bf.prefix((len + 1):end);
60+
end

tests/test_identify_rawsources.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ function test_identify_rawsources_skip_unknown_suffix()
2020

2121
rawsource = identify_rawsources(input_output{i, 1}, map, verbose);
2222

23-
assertEqual(rawsource, {'TODO'});
23+
assertEqual(rawsource, {'sub-01/sub-01_mask.nii.gz'});
2424

2525
end
2626

tests/test_spm_2_bids_metadata.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ function test_spm_2_bids_non_raw_suffix()
4646
[~, ~, json] = spm_2_bids(file, [], false);
4747

4848
assertEqual(fieldnames(json), {'filename'; 'content'});
49-
assertEqual(json.content.RawSources{1}, 'TODO');
50-
assertEqual(json.content.Sources{end}, 'TODO');
49+
assertEqual(json.content.RawSources{1}, 'sub-01/sub-01_task-foo_mask.nii.gz');
50+
assertEqual(json.content.Sources{end}, 'sub-01/sub-01_task-foo_space-individual_desc-realignUnwarp_mask.nii');
5151

5252
bids.util.jsonencode(json.filename, json.content);
5353

0 commit comments

Comments
 (0)