Skip to content

Commit 89897ce

Browse files
committed
update usrIputs
1 parent 209d85e commit 89897ce

File tree

2 files changed

+18
-10
lines changed

2 files changed

+18
-10
lines changed

tests/manualTests/test_userInput.m

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,41 @@
1+
clear
2+
clc
3+
14
%%
5+
fprintf('Debug\n')
26
cfg.debug = true;
37

48
cfg = userInputs(cfg);
5-
disp(cfg);
9+
disp(cfg.subject);
610

711
%%
12+
fprintf('No Group\n')
813
cfg.debug = false;
9-
cfg.askGrpSess = 0;
14+
cfg.subject.askGrpSess = 0;
1015

1116
cfg = userInputs(cfg);
12-
disp(cfg);
17+
disp(cfg.subject);
1318

1419
%%
20+
fprintf('No Group or session\n')
1521
cfg.debug = false;
16-
cfg.askGrpSess = [0 0];
22+
cfg.subject.askGrpSess = [0 0];
1723

1824
cfg = userInputs(cfg);
19-
disp(cfg);
25+
disp(cfg.subject);
2026

2127
%%
28+
fprintf('No session\n')
2229
cfg.debug = false;
23-
cfg.askGrpSess = [0 1];
30+
cfg.subject.askGrpSess = [1 0];
2431

2532
cfg = userInputs(cfg);
26-
disp(cfg);
33+
disp(cfg.subject);
2734

2835
%%
36+
fprintf('Default\n')
2937
cfg.debug = false;
30-
cfg.askGrpSess = [];
38+
cfg.subject.askGrpSess = [];
3139

3240
cfg = userInputs(cfg);
33-
disp(cfg);
41+
disp(cfg.subject);

userInputs.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
end
1717

1818
askGrpSess = [true true];
19-
if isfield(cfg, 'askGrpSess') && ~isempty(cfg.subject.askGrpSess)
19+
if isfield(cfg, 'subject') && isfield(cfg.subject, 'askGrpSess') && ~isempty(cfg.subject.askGrpSess)
2020
askGrpSess = cfg.subject.askGrpSess;
2121
end
2222
if numel(askGrpSess) < 2

0 commit comments

Comments
 (0)