1// ============================================================================ 2// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab 3// Copyright (C) 2011 - DIGITEO - Bruno JOFRET 4// 5// This file is distributed under the same license as the Scilab package. 6// ============================================================================ 7// <-- CLI SHELL MODE --> 8// ============================================================================ 9// Unitary tests for getdrives function 10// ============================================================================ 11ierr = execstr("getdrives(0)", "errcatch"); 12if ierr <> 77 then bugmes();quit;end 13drives = getdrives(); 14if getos() == "Windows" then 15 // 16 // Windows part 17 // 18 // At least one letter 19 if size(drives, '*') < 1 then bugmes();quit;end 20 for i=drives 21 if isdir(i) == %f then bugmes();quit;end 22 end 23else 24 // 25 // Linux and Mac 26 // 27 if size(drives, '*') <> 1 then bugmes();quit;end 28 if drives <> "/" then bugmes();quit;end 29 if isdir(drives) == %f then bugmes();quit;end 30end 31