% Regression test function (black blox) for FreeMat v3.5 % This function is autogenerated by helpgen. function bbtest_success = bbtest_string bbtest_success = 1; NumErrors = 0; try % This is an error catch NumErrors = NumErrors + 1; end try A = ['hello';'bye'] catch NumErrors = NumErrors + 1; end try % This is OK, but awkward catch NumErrors = NumErrors + 1; end try A = ['hello';'bye '] catch NumErrors = NumErrors + 1; end try % This is the right way to do it catch NumErrors = NumErrors + 1; end try A = {'hello','bye'} catch NumErrors = NumErrors + 1; end if (NumErrors ~= 1) bbtest_success = 0; return; end NumErrors = 0; try a = 'I can''t use contractions\n\tOr can I?\n' catch NumErrors = NumErrors + 1; end if (NumErrors ~= 0) bbtest_success = 0; return; end NumErrors = 0; try printf(a); catch NumErrors = NumErrors + 1; end if (NumErrors ~= 0) bbtest_success = 0; return; end NumErrors = 0; try % disp displays it ok catch NumErrors = NumErrors + 1; end try a = 'C:\redball\timewarp\newton.txt' catch NumErrors = NumErrors + 1; end try % printf makes a mess catch NumErrors = NumErrors + 1; end try printf(a) catch NumErrors = NumErrors + 1; end try % If we double up the slashes it works fine catch NumErrors = NumErrors + 1; end try a = 'C:\\redball\\timewarp\\newton.txt' catch NumErrors = NumErrors + 1; end try printf(a) catch NumErrors = NumErrors + 1; end if (NumErrors ~= 0) bbtest_success = 0; return; end