Forbid MOD file names that are too long.
And rename filenames in the testsuite that are too long. Closes #626time-shift
parent
9973c0f8fc
commit
9e332ef305
|
@ -82,6 +82,7 @@ end
|
|||
% Testing if file have extension
|
||||
% If no extension default .mod is added
|
||||
if isempty(strfind(fname,'.'))
|
||||
fnamelength = length(fname);
|
||||
fname1 = [fname '.dyn'];
|
||||
d = dir(fname1);
|
||||
if length(d) == 0
|
||||
|
@ -94,8 +95,13 @@ else
|
|||
&& ~strcmp(upper(fname(size(fname,2)-3:size(fname,2))),'.DYN')
|
||||
error('DYNARE: argument must be a filename with .mod or .dyn extension')
|
||||
end;
|
||||
fnamelength = length(fname) - 4;
|
||||
end;
|
||||
|
||||
if fnamelength + length('_set_auxiliary_variables') > namelengthmax()
|
||||
error('The name of your MOD file is too long, please shorten it')
|
||||
end
|
||||
|
||||
% Workaround for a strange bug with Octave: if there is any call to exist(fname)
|
||||
% before the call to the preprocessor, then Octave will use the old copy of
|
||||
% the .m instead of the newly generated one. Deleting the .m beforehand
|
||||
|
|
|
@ -101,12 +101,12 @@ MODFILES = \
|
|||
dsge-var/simul_hybrid.mod \
|
||||
dsge-var/dsgevar_forward_calibrated_lambda.mod \
|
||||
dsge-var/dsgevar_forward_estimated_lambda.mod \
|
||||
external_function/example1_1st_and_2nd_deriv_functions_provided.mod \
|
||||
external_function/example1_1st_and_2nd_deriv_functions_provided_dll.mod \
|
||||
external_function/example1_1st_deriv_function_provided.mod \
|
||||
external_function/example1_1st_deriv_function_provided_dll.mod \
|
||||
external_function/example1_no_deriv_functions_provided.mod \
|
||||
external_function/example1_no_deriv_functions_provided_dll.mod \
|
||||
external_function/first_and_2nd_deriv_fcns_provided.mod \
|
||||
external_function/first_and_2nd_deriv_fcns_provided_dll.mod \
|
||||
external_function/first_deriv_fcn_provided.mod \
|
||||
external_function/first_deriv_fcn_provided_dll.mod \
|
||||
external_function/no_deriv_fcns_provided.mod \
|
||||
external_function/no_deriv_fcns_provided_dll.mod \
|
||||
seeds.mod \
|
||||
identification/kim/kim2.mod \
|
||||
identification/as2007/as2007.mod \
|
||||
|
|
Loading…
Reference in New Issue