-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #260 from ixcat/issue-228
updates for #258 {setupDJ,setupMYM}.m: minver 9.1/2016b, adjust print/error/warnings.
- Loading branch information
Showing
3 changed files
with
133 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
|
||
classdef TestSetupMYM < tests.Prep | ||
% TestSetupMyM tests setupMYM | ||
|
||
methods (Test) | ||
function TestSetupMYM_testDefaultInstall(testCase) | ||
|
||
[dir, nam, ext] = fileparts(mfilename('fullpath')); | ||
tmym = strcat(dir, '/../', 'mym'); | ||
|
||
if isdir(tmym) | ||
fprintf('testDefaultInstall: mymdir %s exists. removing\n', ... | ||
tmym); | ||
rmdir(tmym, 's'); | ||
end | ||
|
||
ms = setupMYM(); % TODO: how properly verify? | ||
|
||
end | ||
function TestSetupMYM_testVersionInstallFresh(testCase) | ||
[dir, nam, ext] = fileparts(mfilename('fullpath')); | ||
tmym = strcat(dir, '/../', 'mym'); | ||
|
||
if isdir(tmym) | ||
fprintf('testVersionInstallFresh: removing mymdir %s\n', ... | ||
tmym); | ||
rmdir(tmym, 's'); | ||
end | ||
|
||
% TODO: how manage version string? | ||
ms = setupMYM('2.7.2'); % TODO: how properly verify? | ||
|
||
testCase.verifyTrue(isdir(tmym)); | ||
|
||
end | ||
function TestSetupMYM_testVersionInstallStale(testCase) | ||
[dir, nam, ext] = fileparts(mfilename('fullpath')); | ||
tmym = strcat(dir, '/../', 'mym'); | ||
|
||
if ~isdir(tmym) % XXX: valid? how handle otherwise? | ||
fprintf('testVersionInstallStale: spoofing mymdir %s\n', ... | ||
tmym); | ||
mkdir(tmym); | ||
testCase.verifyTrue(isdir(tmym)); | ||
end | ||
|
||
% TODO: how manage version string? | ||
ms = setupMYM('2.7.2'); % TODO: how verify fail? | ||
|
||
end | ||
function TestSetupMYM_testVersionInstallStaleForce(testCase) | ||
[dir, nam, ext] = fileparts(mfilename('fullpath')); | ||
tmym = strcat(dir, '/../', 'mym'); | ||
|
||
if ~isdir(tmym) % XXX: valid? how handle otherwise? | ||
fprintf('testVersionInstallStaleForce: spoofing mymdir %s\n', ... | ||
tmym); | ||
mkdir(tmym); | ||
testCase.verifyTrue(isdir(tmym)); | ||
end | ||
|
||
% TODO: how manage version string? | ||
ms = setupMYM('2.7.2', true); % TODO: how properly verify? | ||
|
||
testCase.verifyTrue(isdir(tmym)); | ||
|
||
end | ||
function TestSetupMYM_testMasterInstallFresh(testCase) | ||
[dir, nam, ext] = fileparts(mfilename('fullpath')); | ||
tmym = strcat(dir, '/../', 'mym'); | ||
|
||
if isdir(tmym) | ||
fprintf('testMasterInstallFresh: removing mymdir %s\n', ... | ||
tmym); | ||
rmdir(tmym, 's'); | ||
end | ||
|
||
ms = setupMYM('master'); % TODO: how properly verify | ||
|
||
testCase.verifyTrue(isdir(tmym)); | ||
|
||
end | ||
function TestSetupMYM_testMasterInstallStale(testCase) | ||
[dir, nam, ext] = fileparts(mfilename('fullpath')); | ||
tmym = strcat(dir, '/../', 'mym'); | ||
|
||
if ~isdir(tmym) % XXX: valid? how handle otherwise? | ||
fprintf('testMasterInstallStale: spoofing mymdir %s\n', ... | ||
tmym); | ||
mkdir(tmym); | ||
testCase.verifyTrue(isdir(tmym)); | ||
end | ||
|
||
ms = setupMYM('master'); % TODO: how verify fail? | ||
|
||
end | ||
function TestSetupMYM_testMasterInstallStaleForce(testCase) | ||
[dir, nam, ext] = fileparts(mfilename('fullpath')); | ||
tmym = strcat(dir, '/../', 'mym'); | ||
|
||
if ~isdir(tmym) % XXX: valid? how handle otherwise? | ||
fprintf('testMasterInstallStaleForce: spoofing mymdir %s\n', ... | ||
tmym); | ||
mkdir(tmym); | ||
testCase.verifyTrue(isdir(tmym)); | ||
end | ||
|
||
ms = setupMYM('master'); % TODO: how properly verify | ||
|
||
testCase.verifyTrue(isdir(tmym)); | ||
|
||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters