1 // =============================================================================
2 // Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3 // Copyright (C) 2013 - Scilab Enterprises - Vincent COUVERT
5 // This file is distributed under the same license as the Scilab package.
6 // =============================================================================
8 // <-- CLI SHELL MODE -->
10 // <-- Non-regression test for bug 12168 -->
12 // <-- Bugzilla URL -->
13 // http://bugzilla.scilab.org/show_bug.cgi?id=12168
15 // <-- Short Description -->
16 // Segfault when listing a closed matfile.
20 testfile = fullfile(TMPDIR, "bug_12168.mat");
21 savematfile(testfile, "A", "-v6");
22 fd = matfile_open(testfile);
24 refMsg = msprintf(_("%s: Invalid file identifier.\n"), "matfile_listvar");
25 assert_checkerror("matfile_listvar(fd);", refMsg);