1 // =============================================================================
2 // Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3 // Copyright (C) 2014 - Scilab Enterprises - Pierre-Aime Agnel
5 // This file is distributed under the same license as the Scilab package.
6 // =============================================================================
8 // <-- CLI SHELL MODE -->
10 // <-- Non-regression test for bug 13272 -->
12 // <-- Bugzilla URL -->
13 // http://bugzilla.scilab.org/show_bug.cgi?id=13272
15 // <-- Short Description -->
16 // csvRead does not return in error when looking for comments on a csv file where no comment is present
17 // csvRead returns an empty matrix for comment in this case
19 //Creating a test CSV file
20 dummyFile = TMPDIR + filesep() + "bug_13272.csv";
21 csvWrite(['1', '', '3'; '', '', '6'], dummyFile);
23 //Files does not contain 7 as a comment
24 iErr = execstr("[M, comment] = csvRead(dummyFile, "","", ""."", ""string"", [], ""/7/"")", "errcatch");
26 assert_checkequal(iErr, 0);
27 assert_checktrue(isempty(comment));