Tk Library Source Code

Artifact [f305822714]
Login

Artifact f305822714bfd8458f3685ec1e491bb84be59784:

Attachment "465210.diff" to ticket [465210ffff] added by andreas_kupries 2001-09-29 01:09:53.
Index: modules/csv/ChangeLog
===================================================================
RCS file: /cvsroot/tcllib/tcllib/modules/csv/ChangeLog,v
retrieving revision 1.5
diff -u -r1.5 ChangeLog
--- modules/csv/ChangeLog	2001/09/05 23:53:52	1.5
+++ modules/csv/ChangeLog	2001/09/28 18:08:32
@@ -1,3 +1,11 @@
+2001-09-28  Andreas Kupries  <[email protected]>
+
+	* csv.test: Added test to verify that the problem is fixed.
+
+	* csv.tcl (joinlist): Fixed bug [#465210] "::csv::joinlist
+	  sepChar handling". The "sepChar" was not propagated to the
+	  actual join operation.
+
 2001-09-05  Andreas Kupries  <[email protected]>
 
 	* csv.tcl: Restricted export list to public API.
Index: modules/csv/csv.tcl
===================================================================
RCS file: /cvsroot/tcllib/tcllib/modules/csv/csv.tcl,v
retrieving revision 1.5
diff -u -r1.5 csv.tcl
--- modules/csv/csv.tcl	2001/09/05 23:53:52	1.5
+++ modules/csv/csv.tcl	2001/09/28 18:08:32
@@ -60,7 +60,7 @@
 proc ::csv::joinlist {values {sepChar ,}} {
     set out ""
     foreach record $values {
-	append out "[join $record]\n"
+	append out "[join $record $sepChar]\n"
     }
     return $out
 }
Index: modules/csv/csv.test
===================================================================
RCS file: /cvsroot/tcllib/tcllib/modules/csv/csv.test,v
retrieving revision 1.1
diff -u -r1.1 csv.test
--- modules/csv/csv.test	2001/05/01 19:01:24	1.1
+++ modules/csv/csv.test	2001/09/28 18:08:33
@@ -103,6 +103,10 @@
 	    {123 123,521.2 {Mary says "Hello, I am Mary"}}]
 } "$str1a\n$str2\n$str3a\n$str4\n$str5\n$str6\n"
 
+test csv-4.2 {joinlist, sepChar} {
+    csv::joinlist [list [list a b c] [list d e f]] @
+} "a@b@c\nd@e@f\n"
+
 
 test csv-5.1 {reading csv files} {
     set f [open [file join $::tcltest::testsDirectory mem_debug_bench.csv] r]