- Timestamp:
- May 9, 2011, 4:39:18 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/dbnp/studycapturing/AssayServiceTests.groovy
r1803 r1827 269 269 // - double quotes should be escaped by double quotes ( " -> "" ) 270 270 // - other strings and numbers should remain 'quoteless' 271 // - is the custom delimiter (e.g. tab, comma, semicolon) correctly handled 271 272 272 273 def rowData = [["""a … … 275 276 def baos = new ByteArrayOutputStream() 276 277 277 service.exportRowWiseDataToCSVFile rowData, baos 278 278 service.exportRowWiseDataToCSVFile rowData, baos, '\t' 279 assertEquals 'CSV Output', '"a\nb"\t"a,b"\t"a""b"\tabc\n1\t2.0\t"3,1"', baos.toString() 280 281 baos.reset() 282 283 service.exportRowWiseDataToCSVFile rowData, baos, ',' 279 284 assertEquals 'CSV Output', '"a\nb","a,b","a""b",abc\n1,2.0,"3,1"', baos.toString() 280 285 286 baos.reset() 287 288 service.exportRowWiseDataToCSVFile rowData, baos, ';' 289 assertEquals 'CSV Output', '"a\nb";"a,b";"a""b";abc\n1;2.0;"3,1"', baos.toString() 290 291 281 292 } 282 293 }
Note: See TracChangeset
for help on using the changeset viewer.