1// ============================================================================= 2// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab 3// Copyright (C) 2009 - DIGITEO 4// 5// This file is distributed under the same license as the Scilab package. 6// ============================================================================= 7// <-- JVM MANDATORY --> 8chdir(TMPDIR); 9exec(SCI+"/modules/localization/tests/unit_tests/CreateDir.sce", -1); 10tab_ref = [ 11"世界您好", 12"азеазея", 13"ハロー・ワールド", 14"เฮลโลเวิลด์", 15"حريات وحقوق", 16"프로그램", 17"프로그램", 18"תוכנית"]; 19sleep(2); 20if(fileinfo("test_time") <> []) 21 deletefile("test_time"); 22end 23f = mopen("test_time", "w"); 24mclose(f); 25ref = 0; 26FileNameList = ["test_time"]; 27for i = 1 : size(tab_ref,'*') 28 FileNameList(i+1) = "dir_" + tab_ref(i) + filesep() + "file_" + tab_ref(i); 29end 30a = newest(FileNameList); 31if(a <> 1) then 32 pause 33end 34a=dir('SCI\bin'); 35f1=a(2); 36r1=newest(f1); 37clear a f1 r1 38realtimeinit(2); 39realtime(0); 40tab_ref = [ 41"世界您好", 42"азеазея", 43"ハロー・ワールド", 44"حريات وحقوق", 45"תוכנית"]; 46for k=1 : size(tab_ref,"*") 47 realtime(k); 48 mputl("",TMPDIR+"/newest_"+tab_ref(k)); 49end 50if newest([]) <> [] then bugmes();quit;end 51if newest() <> [] then bugmes();quit;end 52if newest("SCI/etc/scilab.start") <> 1 then bugmes();quit;end 53if newest("SCI/nofile.txt") <> 1 then bugmes();quit;end 54for i = 1 : size(tab_ref,"*") 55 for j = size(tab_ref,"*") : -1 : 1 56 if(i <> j) then 57 ref = max(i,j); 58 if(ref == i) then 59 ref = 1; 60 else; 61 ref = 2; 62 end 63 if(newest(TMPDIR+"/newest_"+tab_ref(i), TMPDIR+"/newest_"+tab_ref(j)) <> ref) then bugmes();quit;end 64 if(newest([TMPDIR+"/newest_"+tab_ref(i), TMPDIR+"/newest_"+tab_ref(j)]) <> ref) then bugmes();quit;end 65 if(newest([TMPDIR+"/newest_"+tab_ref(i); TMPDIR+"/newest_"+tab_ref(j)]) <> ref) then bugmes();quit;end 66 if(newest(TMPDIR+"/newest_"+tab_ref(i), TMPDIR+"/no_file") <> 1) then bugmes();quit;end 67 if(newest([TMPDIR+"/newest_"+tab_ref(i), TMPDIR+"/no_file"]) <> 1) then bugmes();quit;end 68 if(newest([TMPDIR+"/newest_"+tab_ref(i); TMPDIR+"/no_file"]) <> 1) then bugmes();quit;end 69 end 70 end 71end 72