* Bug #8654 fixed - Use the standard separator for csv. 61/9061/2
Sylvestre Ledru [Wed, 19 Sep 2012 08:11:50 +0000 (10:11 +0200)]
Change-Id: If0062e13dda94c41ec97484f454edf8529cb74f2

scilab/CHANGES_5.4.X
scilab/modules/spreadsheet/tests/nonreg_tests/bug_8654.dia.ref [new file with mode: 0644]
scilab/modules/spreadsheet/tests/nonreg_tests/bug_8654.tst [new file with mode: 0644]

index d1e4131..bca990b 100644 (file)
@@ -16,11 +16,11 @@ CSV features
   - Write performances improved to a 100x factor.
   - Read performances improved from 3x to 200x factor.
 
-* Bug #8656 fixed - The write_csv function had accuracy issues.
+* Bug #8654 fixed - write_csv did not use the standard separator and decimal mark.
 
-* Bug #9969 fixed - Performances of CSV functions were bad for large files.
+* Bug #8656 fixed - write_csv had accuracy issues.
 
-* Bug #9969 fixed - Strong improvement of the performances.
+* Bug #9969 fixed - Performances of CSV functions were bad for large files.
 
 * Bug #10203 fixed - The help pages of CSV function did not details the encoding
                      management.
diff --git a/scilab/modules/spreadsheet/tests/nonreg_tests/bug_8654.dia.ref b/scilab/modules/spreadsheet/tests/nonreg_tests/bug_8654.dia.ref
new file mode 100644 (file)
index 0000000..535259a
--- /dev/null
@@ -0,0 +1,27 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2012 - S/E - Sylvestre Ledru
+//
+//  This file is distributed under the same license as the Scilab package.
+// =============================================================================
+// 
+// <-- JAVA NOT MANDATORY -->
+//
+// <-- Non-regression test for bug 8654 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=8654
+//
+// <-- Short Description -->
+// Use the standard separator for csv.
+//
+A = [0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1];
+filename=fullfile(TMPDIR,'data.csv');
+write_csv(A,filename);
+B = evstr(read_csv(filename));
+assert_checkequal(A,B);
+A = [1:10] * 0.1;
+filename=fullfile(TMPDIR,'data2.csv');
+write_csv(A,filename);
+B = evstr(read_csv(filename));
+assert_checkequal(A,B);
diff --git a/scilab/modules/spreadsheet/tests/nonreg_tests/bug_8654.tst b/scilab/modules/spreadsheet/tests/nonreg_tests/bug_8654.tst
new file mode 100644 (file)
index 0000000..d233fc1
--- /dev/null
@@ -0,0 +1,28 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2012 - S/E - Sylvestre Ledru
+//
+//  This file is distributed under the same license as the Scilab package.
+// =============================================================================
+// 
+// <-- JAVA NOT MANDATORY -->
+//
+// <-- Non-regression test for bug 8654 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=8654
+//
+// <-- Short Description -->
+// Use the standard separator for csv.
+//
+A = [0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1];
+filename=fullfile(TMPDIR,'data.csv');
+write_csv(A,filename);
+B = evstr(read_csv(filename));
+assert_checkequal(A,B);
+
+A = [1:10] * 0.1;
+filename=fullfile(TMPDIR,'data2.csv');
+write_csv(A,filename);
+B = evstr(read_csv(filename));
+assert_checkequal(A,B);