1// ============================================================================= 2// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab 3// Copyright (C) 2007-2008 - INRIA - Pierre MARECHAL <pierre.marechal@inria.fr> 4// 5// This file is distributed under the same license as the Scilab package. 6// ============================================================================= 7 8// <-- CLI SHELL MODE --> 9 10// <-- Non-regression test for bug 1966 --> 11// 12// <-- Bugzilla URL --> 13// http://bugzilla.scilab.org/show_bug.cgi?id=1966 14// 15// <-- Short Description --> 16// 17// getd doesn't work 18// 19//-->getd(pwd()) 20// !--error 998 21//Can't go to directory getd(pwd()) 22//at line 14 of function cd called by : 23//cd getd(pwd()) 24 25my_dir = pathconvert(TMPDIR+"/bug_1966",%F,%F); 26my_file = pathconvert(my_dir+"/bug_1966_tst.sci",%F,%F); 27my_function_str = ["function c=bug_1966_tst(a,b)"; .. 28 " c = a + b;"; .. 29 "endfunction"]; 30 31mkdir(my_dir); 32 33mputl(my_function_str,my_file); 34 35if execstr("getd(my_dir);","errcatch") <> 0 then pause,end 36cd(my_dir); 37if execstr("getd(pwd());","errcatch") <> 0 then pause,end 38