Avoid errors when dia contains less than 10 lines 35/8735/1
Vincent COUVERT [Mon, 20 Aug 2012 08:20:07 +0000 (10:20 +0200)]
Change-Id: Ic5bf3ec72675ce0dbfd56b2ec5ccd21faca4ee9d

scilab/modules/development_tools/macros/test_run.sci

index 1c670ea..265e80e 100644 (file)
@@ -879,7 +879,7 @@ if grep(dia_tmp,"error on test")<>[] then
   status.message = "failed: one or several tests failed";
   status.details = details;
   if params.show_error == %t then
-    status.details = [ status.details; dia($-10:$) ]
+    status.details = [ status.details; dia($-min(10, size(dia, "*")-1):$) ]
   end
   return;
 end