1//<-- CLI SHELL MODE -->
2// =============================================================================
3// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4// Copyright (C) 2009 - DIGITEO - Allan CORNET
5//
6//  This file is distributed under the same license as the Scilab package.
7// =============================================================================
8// <-- JVM MANDATORY -->
9cd(TMPDIR);
10exec(SCI+"/modules/localization/tests/unit_tests/CreateDir.sce", -1);
11tab_ref = [
12"世界您好",
13"азеазея",
14"ハロー・ワールド",
15"เฮลโลเวิลด์",
16"حريات وحقوق",
17"프로그램",
18"תוכנית"];
19lang_name = ["Simplified Chinese",
20        "Cyrillic",
21        "Japanese",
22        "Thai",
23        "Arabish",
24        "Vietanmien",
25        "Hebreu"];
26for i = 1 : size(tab_ref,'*')
27	dz = "dir_" + tab_ref(i);
28	p = cd(dz);
29
30	fd1 = mopen('file_'+tab_ref(i),'rt');
31	r1 = mgetl(fd1);
32	mclose(fd1);
33
34	ref_str = 'str_' + tab_ref(i) + ' : ' + lang_name(i);
35	if (r1 <> ref_str) then bugmes();quit;end
36
37	cd(TMPDIR);
38
39	filenam = TMPDIR + filesep() + "dir_" + tab_ref(i) + filesep() + 'file_'+tab_ref(i);
40	fd2 = mopen(filenam);
41	r2 = mgetl(fd2);
42	mclose(fd2);
43
44	if (r2 <> ref_str) then bugmes();quit;end
45
46end
47