1// =============================================================================
2// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3// Copyright (C) 2021 - Stéphane MOTTELET
4//
5//  This file is distributed under the same license as the Scilab package.
6// =============================================================================
7
8// <-- CLI SHELL MODE -->
9// <-- NO CHECK REF -->
10
11fd = mopen(TMPDIR + filesep() + ['mclose_tst_1','mclose_tst_2'],'wt');
12mputl("test string 1",fd(1));
13mputl("test string 2",fd(2));
14mclose(fd);
15
16fd = mopen(TMPDIR + filesep() + ['mclose_tst_1','mclose_tst_2']);
17str = [mgetl(fd(1)),mgetl(fd(2))];
18mclose(fd);
19
20assert_checkequal(str,["test string 1","test string 2"]);