forked from PolyMathOrg/DataFrame
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTestCsvStrings.class.st
110 lines (96 loc) · 2.42 KB
/
TestCsvStrings.class.st
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
Class {
#name : #TestCsvStrings,
#superclass : #Object,
#category : #'DataFrame-IO-Tests-Core'
}
{ #category : #running }
TestCsvStrings class >> commaCsvString [
^ ',temperature,precipitation,type
1:10 am,2.4,true,rain
1:30 am,0.5,true,rain
1:50 am,-1.2,true,snow
2:10 am,-2.3,false,-
2:30 am,3.2,true,rain
'
]
{ #category : #running }
TestCsvStrings class >> commaCsvWithoutRowNameString [
^ 'temperature,precipitation,type
2.4,true,rain
0.5,true,rain
-1.2,true,snow
-2.3,false,-
3.2,true,rain
'
]
{ #category : #running }
TestCsvStrings class >> commaQuoteCsvString [
^ '"","temperature","precipitation","type"
"1:10 am","2.4","true","rain"
"1:30 am","0.5","true","rain"
"1:50 am","-1.2","true","snow"
"2:10 am","-2.3","false","-"
"2:30 am","3.2","true","rain"
'
]
{ #category : #running }
TestCsvStrings class >> commaQuoteCsvStringWithoutColumnNames [
^ '"1:10 am","2.4","true","rain"
"1:30 am","0.5","true","rain"
"1:50 am","-1.2","true","snow"
"2:10 am","-2.3","false","-"
"2:30 am","3.2","true","rain"
'
]
{ #category : #running }
TestCsvStrings class >> commaQuoteCsvStringWithoutRowNames [
^ '"temperature","precipitation","type"
"2.4","true","rain"
"0.5","true","rain"
"-1.2","true","snow"
"-2.3","false","-"
"3.2","true","rain"
'
]
{ #category : #running }
TestCsvStrings class >> commaQuoteCsvStringWithoutRowNamesWithoutColumnNames [
^ '"2.4","true","rain"
"0.5","true","rain"
"-1.2","true","snow"
"-2.3","false","-"
"3.2","true","rain"
'
]
{ #category : #running }
TestCsvStrings class >> dollarSignCsvString [
^ 'Given$a$text$file$of$many$lines,$where$fields$within$a$line$
are$delineated$by$a$single$''dollar''$character,$write$a$program
that$aligns$each$column$of$fields$by$ensuring$that$words$in$each$
column$are$separated$by$at$least$one$space.
Further,$allow$for$each$word$in$a$column$to$be$either$left$
justified,$right$justified,$or$center$justified$within$its$column.'
]
{ #category : #running }
TestCsvStrings class >> emptyCsvString [
^ ''
]
{ #category : #running }
TestCsvStrings class >> tabCsvString [
^ ' temperature precipitation type
1:10 am 2.4 true rain
1:30 am 0.5 true rain
1:50 am -1.2 true snow
2:10 am -2.3 false -
2:30 am 3.2 true rain
'
]
{ #category : #running }
TestCsvStrings class >> tabQuoteCsvString [
^ '"" "temperature" "precipitation" "type"
"1:10 am" "2.4" "true" "rain"
"1:30 am" "0.5" "true" "rain"
"1:50 am" "-1.2" "true" "snow"
"2:10 am" "-2.3" "false" "-"
"2:30 am" "3.2" "true" "rain"
'
]