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// =============================================================================
8file1 = TMPDIR+'/test1.bin';
9file2 = TMPDIR+'/test2.bin';
10fd1 = mopen(file1,'wb');
11fd2 = mopen(file2,'wb');
12mput(1996,'ull',fd1);
13mput(1996,'ull',fd2);
14mclose(fd1);
15mclose(fd2);
16
17fd1 = mopen(file1,'rb');
18if 1996<>mget(1,'ull',fd1) then
19    write(%io(2),'Bug');
20end
21fd2 = mopen(file2,'rb');
22if 1996<>mget(1,'ull',fd2) then
23    write(%io(2),'Bug');
24end
25mclose(fd1);
26mclose(fd2);
27
28fd1 = mopen(file1,'rb');
29
30ierr = execstr('mget([1 2],''ull'',fd2)','errcatch');
31if ierr <> 999 then pause,end
32
33ierr = execstr('mget([1 2],''ull'',[fd2 fd2])','errcatch');
34if ierr <> 999 then pause,end
35
36ierr = execstr('mget(''rrrr'',''ull'',[fd2 fd2])','errcatch');
37if ierr <> 999 then pause,end
38
39ierr = execstr('mget(1,1,''fd2'')','errcatch');
40if ierr <> 999 then pause,end
41
42mclose(fd1);
43
44ierr = execstr('mget(1,''ull'',0)','errcatch');
45if ierr <> 999 then pause,end
46ierr = execstr('mget(1,''ull'',6)','errcatch');
47if ierr <> 999 then pause,end
48