money_parser 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +19 -0
- data/.rspec +2 -0
- data/Gemfile +3 -0
- data/MIT-LICENSE +20 -0
- data/README.rdoc +29 -0
- data/Rakefile +101 -0
- data/VERSION +1 -0
- data/lib/money_parser.rb +40 -0
- data/money_parser.gemspec +14 -0
- data/spec/money_parser_spec.rb +1693 -0
- data/spec/spec_helper.rb +51 -0
- data/specification.rb +52 -0
- data/test/money_parser_spec.js +1357 -0
- data/vendor/assets/javascripts/parse_money.js +44 -0
- metadata +71 -0
@@ -0,0 +1,1357 @@
|
|
1
|
+
var assert = require("assert")
|
2
|
+
var parseMoney = require('../vendor/assets/javascripts/parse_money');
|
3
|
+
|
4
|
+
describe('moneyParse', function(){
|
5
|
+
|
6
|
+
it('"2000.01" should be parsed as 2000.01 ', function(){
|
7
|
+
assert.equal(2000.01, parseMoney("2000.01"));
|
8
|
+
});
|
9
|
+
|
10
|
+
it('" - 2000.01" should be parsed as -2000.01 (negative amount)', function(){
|
11
|
+
assert.equal(-2000.01, parseMoney(" - 2000.01"));
|
12
|
+
});
|
13
|
+
|
14
|
+
it('"20o0.01" should be parsed as 2000.01 (with O instead of 0)', function(){
|
15
|
+
assert.equal(2000.01, parseMoney("20o0.01"));
|
16
|
+
});
|
17
|
+
|
18
|
+
it('"$2000.01" should be parsed as 2000.01 (with a dollar sign)', function(){
|
19
|
+
assert.equal(2000.01, parseMoney("$2000.01"));
|
20
|
+
});
|
21
|
+
|
22
|
+
it('"€2000.01" should be parsed as 2000.01 (with a euro sign)', function(){
|
23
|
+
assert.equal(2000.01, parseMoney("€2000.01"));
|
24
|
+
});
|
25
|
+
|
26
|
+
it('"£2000.01" should be parsed as 2000.01 (with a pound sign)', function(){
|
27
|
+
assert.equal(2000.01, parseMoney("£2000.01"));
|
28
|
+
});
|
29
|
+
|
30
|
+
it('"₤2000.01" should be parsed as 2000.01 (with a pound sign)', function(){
|
31
|
+
assert.equal(2000.01, parseMoney("₤2000.01"));
|
32
|
+
});
|
33
|
+
|
34
|
+
it('"2000,01" should be parsed as 2000.01 ', function(){
|
35
|
+
assert.equal(2000.01, parseMoney("2000,01"));
|
36
|
+
});
|
37
|
+
|
38
|
+
it('"- 2000,01" should be parsed as -2000.01 (negative amount)', function(){
|
39
|
+
assert.equal(-2000.01, parseMoney("- 2000,01"));
|
40
|
+
});
|
41
|
+
|
42
|
+
it('"2o00,01" should be parsed as 2000.01 (with O instead of 0)', function(){
|
43
|
+
assert.equal(2000.01, parseMoney("2o00,01"));
|
44
|
+
});
|
45
|
+
|
46
|
+
it('"$2000,01" should be parsed as 2000.01 (with a dollar sign)', function(){
|
47
|
+
assert.equal(2000.01, parseMoney("$2000,01"));
|
48
|
+
});
|
49
|
+
|
50
|
+
it('"€2000,01" should be parsed as 2000.01 (with a euro sign)', function(){
|
51
|
+
assert.equal(2000.01, parseMoney("€2000,01"));
|
52
|
+
});
|
53
|
+
|
54
|
+
it('"£2000,01" should be parsed as 2000.01 (with a pound sign)', function(){
|
55
|
+
assert.equal(2000.01, parseMoney("£2000,01"));
|
56
|
+
});
|
57
|
+
|
58
|
+
it('"₤2000,01" should be parsed as 2000.01 (with a pound sign)', function(){
|
59
|
+
assert.equal(2000.01, parseMoney("₤2000,01"));
|
60
|
+
});
|
61
|
+
|
62
|
+
it('"2000.1" should be parsed as 2000.1 ', function(){
|
63
|
+
assert.equal(2000.1, parseMoney("2000.1"));
|
64
|
+
});
|
65
|
+
|
66
|
+
it('" - 2000.1" should be parsed as -2000.1 (negative amount)', function(){
|
67
|
+
assert.equal(-2000.1, parseMoney(" - 2000.1"));
|
68
|
+
});
|
69
|
+
|
70
|
+
it('"20o0.1" should be parsed as 2000.1 (with O instead of 0)', function(){
|
71
|
+
assert.equal(2000.1, parseMoney("20o0.1"));
|
72
|
+
});
|
73
|
+
|
74
|
+
it('"$2000.1" should be parsed as 2000.1 (with a dollar sign)', function(){
|
75
|
+
assert.equal(2000.1, parseMoney("$2000.1"));
|
76
|
+
});
|
77
|
+
|
78
|
+
it('"€2000.1" should be parsed as 2000.1 (with a euro sign)', function(){
|
79
|
+
assert.equal(2000.1, parseMoney("€2000.1"));
|
80
|
+
});
|
81
|
+
|
82
|
+
it('"£2000.1" should be parsed as 2000.1 (with a pound sign)', function(){
|
83
|
+
assert.equal(2000.1, parseMoney("£2000.1"));
|
84
|
+
});
|
85
|
+
|
86
|
+
it('"₤2000.1" should be parsed as 2000.1 (with a pound sign)', function(){
|
87
|
+
assert.equal(2000.1, parseMoney("₤2000.1"));
|
88
|
+
});
|
89
|
+
|
90
|
+
it('"2000,1" should be parsed as 2000.1 ', function(){
|
91
|
+
assert.equal(2000.1, parseMoney("2000,1"));
|
92
|
+
});
|
93
|
+
|
94
|
+
it('" -2000,1" should be parsed as -2000.1 (negative amount)', function(){
|
95
|
+
assert.equal(-2000.1, parseMoney(" -2000,1"));
|
96
|
+
});
|
97
|
+
|
98
|
+
it('"20o0,1" should be parsed as 2000.1 (with O instead of 0)', function(){
|
99
|
+
assert.equal(2000.1, parseMoney("20o0,1"));
|
100
|
+
});
|
101
|
+
|
102
|
+
it('"$2000,1" should be parsed as 2000.1 (with a dollar sign)', function(){
|
103
|
+
assert.equal(2000.1, parseMoney("$2000,1"));
|
104
|
+
});
|
105
|
+
|
106
|
+
it('"€2000,1" should be parsed as 2000.1 (with a euro sign)', function(){
|
107
|
+
assert.equal(2000.1, parseMoney("€2000,1"));
|
108
|
+
});
|
109
|
+
|
110
|
+
it('"£2000,1" should be parsed as 2000.1 (with a pound sign)', function(){
|
111
|
+
assert.equal(2000.1, parseMoney("£2000,1"));
|
112
|
+
});
|
113
|
+
|
114
|
+
it('"₤2000,1" should be parsed as 2000.1 (with a pound sign)', function(){
|
115
|
+
assert.equal(2000.1, parseMoney("₤2000,1"));
|
116
|
+
});
|
117
|
+
|
118
|
+
it('"2000" should be parsed as 2000.0 ', function(){
|
119
|
+
assert.equal(2000.0, parseMoney("2000"));
|
120
|
+
});
|
121
|
+
|
122
|
+
it('" - 2000" should be parsed as -2000.0 (negative amount)', function(){
|
123
|
+
assert.equal(-2000.0, parseMoney(" - 2000"));
|
124
|
+
});
|
125
|
+
|
126
|
+
it('"20o0" should be parsed as 2000.0 (with O instead of 0)', function(){
|
127
|
+
assert.equal(2000.0, parseMoney("20o0"));
|
128
|
+
});
|
129
|
+
|
130
|
+
it('"$2000" should be parsed as 2000.0 (with a dollar sign)', function(){
|
131
|
+
assert.equal(2000.0, parseMoney("$2000"));
|
132
|
+
});
|
133
|
+
|
134
|
+
it('"€2000" should be parsed as 2000.0 (with a euro sign)', function(){
|
135
|
+
assert.equal(2000.0, parseMoney("€2000"));
|
136
|
+
});
|
137
|
+
|
138
|
+
it('"£2000" should be parsed as 2000.0 (with a pound sign)', function(){
|
139
|
+
assert.equal(2000.0, parseMoney("£2000"));
|
140
|
+
});
|
141
|
+
|
142
|
+
it('"₤2000" should be parsed as 2000.0 (with a pound sign)', function(){
|
143
|
+
assert.equal(2000.0, parseMoney("₤2000"));
|
144
|
+
});
|
145
|
+
|
146
|
+
it('".01" should be parsed as 0.01 ', function(){
|
147
|
+
assert.equal(0.01, parseMoney(".01"));
|
148
|
+
});
|
149
|
+
|
150
|
+
it('" - .01" should be parsed as -0.01 (negative amount)', function(){
|
151
|
+
assert.equal(-0.01, parseMoney(" - .01"));
|
152
|
+
});
|
153
|
+
|
154
|
+
it('".o1" should be parsed as 0.01 (with O instead of 0)', function(){
|
155
|
+
assert.equal(0.01, parseMoney(".o1"));
|
156
|
+
});
|
157
|
+
|
158
|
+
it('"$.01" should be parsed as 0.01 (with a dollar sign)', function(){
|
159
|
+
assert.equal(0.01, parseMoney("$.01"));
|
160
|
+
});
|
161
|
+
|
162
|
+
it('"€.01" should be parsed as 0.01 (with a euro sign)', function(){
|
163
|
+
assert.equal(0.01, parseMoney("€.01"));
|
164
|
+
});
|
165
|
+
|
166
|
+
it('"£.01" should be parsed as 0.01 (with a pound sign)', function(){
|
167
|
+
assert.equal(0.01, parseMoney("£.01"));
|
168
|
+
});
|
169
|
+
|
170
|
+
it('"₤.01" should be parsed as 0.01 (with a pound sign)', function(){
|
171
|
+
assert.equal(0.01, parseMoney("₤.01"));
|
172
|
+
});
|
173
|
+
|
174
|
+
it('",01" should be parsed as 0.01 ', function(){
|
175
|
+
assert.equal(0.01, parseMoney(",01"));
|
176
|
+
});
|
177
|
+
|
178
|
+
it('"- ,01" should be parsed as -0.01 (negative amount)', function(){
|
179
|
+
assert.equal(-0.01, parseMoney("- ,01"));
|
180
|
+
});
|
181
|
+
|
182
|
+
it('",o1" should be parsed as 0.01 (with O instead of 0)', function(){
|
183
|
+
assert.equal(0.01, parseMoney(",o1"));
|
184
|
+
});
|
185
|
+
|
186
|
+
it('"$,01" should be parsed as 0.01 (with a dollar sign)', function(){
|
187
|
+
assert.equal(0.01, parseMoney("$,01"));
|
188
|
+
});
|
189
|
+
|
190
|
+
it('"€,01" should be parsed as 0.01 (with a euro sign)', function(){
|
191
|
+
assert.equal(0.01, parseMoney("€,01"));
|
192
|
+
});
|
193
|
+
|
194
|
+
it('"£,01" should be parsed as 0.01 (with a pound sign)', function(){
|
195
|
+
assert.equal(0.01, parseMoney("£,01"));
|
196
|
+
});
|
197
|
+
|
198
|
+
it('"₤,01" should be parsed as 0.01 (with a pound sign)', function(){
|
199
|
+
assert.equal(0.01, parseMoney("₤,01"));
|
200
|
+
});
|
201
|
+
|
202
|
+
it('"0.01" should be parsed as 0.01 ', function(){
|
203
|
+
assert.equal(0.01, parseMoney("0.01"));
|
204
|
+
});
|
205
|
+
|
206
|
+
it('" - 0.01" should be parsed as -0.01 (negative amount)', function(){
|
207
|
+
assert.equal(-0.01, parseMoney(" - 0.01"));
|
208
|
+
});
|
209
|
+
|
210
|
+
it('"o.01" should be parsed as 0.01 (with O instead of 0)', function(){
|
211
|
+
assert.equal(0.01, parseMoney("o.01"));
|
212
|
+
});
|
213
|
+
|
214
|
+
it('"$0.01" should be parsed as 0.01 (with a dollar sign)', function(){
|
215
|
+
assert.equal(0.01, parseMoney("$0.01"));
|
216
|
+
});
|
217
|
+
|
218
|
+
it('"€0.01" should be parsed as 0.01 (with a euro sign)', function(){
|
219
|
+
assert.equal(0.01, parseMoney("€0.01"));
|
220
|
+
});
|
221
|
+
|
222
|
+
it('"£0.01" should be parsed as 0.01 (with a pound sign)', function(){
|
223
|
+
assert.equal(0.01, parseMoney("£0.01"));
|
224
|
+
});
|
225
|
+
|
226
|
+
it('"₤0.01" should be parsed as 0.01 (with a pound sign)', function(){
|
227
|
+
assert.equal(0.01, parseMoney("₤0.01"));
|
228
|
+
});
|
229
|
+
|
230
|
+
it('"0,01" should be parsed as 0.01 ', function(){
|
231
|
+
assert.equal(0.01, parseMoney("0,01"));
|
232
|
+
});
|
233
|
+
|
234
|
+
it('" -0,01" should be parsed as -0.01 (negative amount)', function(){
|
235
|
+
assert.equal(-0.01, parseMoney(" -0,01"));
|
236
|
+
});
|
237
|
+
|
238
|
+
it('"0,o1" should be parsed as 0.01 (with O instead of 0)', function(){
|
239
|
+
assert.equal(0.01, parseMoney("0,o1"));
|
240
|
+
});
|
241
|
+
|
242
|
+
it('"$0,01" should be parsed as 0.01 (with a dollar sign)', function(){
|
243
|
+
assert.equal(0.01, parseMoney("$0,01"));
|
244
|
+
});
|
245
|
+
|
246
|
+
it('"€0,01" should be parsed as 0.01 (with a euro sign)', function(){
|
247
|
+
assert.equal(0.01, parseMoney("€0,01"));
|
248
|
+
});
|
249
|
+
|
250
|
+
it('"£0,01" should be parsed as 0.01 (with a pound sign)', function(){
|
251
|
+
assert.equal(0.01, parseMoney("£0,01"));
|
252
|
+
});
|
253
|
+
|
254
|
+
it('"₤0,01" should be parsed as 0.01 (with a pound sign)', function(){
|
255
|
+
assert.equal(0.01, parseMoney("₤0,01"));
|
256
|
+
});
|
257
|
+
|
258
|
+
it('".1" should be parsed as 0.1 ', function(){
|
259
|
+
assert.equal(0.1, parseMoney(".1"));
|
260
|
+
});
|
261
|
+
|
262
|
+
it('" - .1" should be parsed as -0.1 (negative amount)', function(){
|
263
|
+
assert.equal(-0.1, parseMoney(" - .1"));
|
264
|
+
});
|
265
|
+
|
266
|
+
it('"$.1" should be parsed as 0.1 (with a dollar sign)', function(){
|
267
|
+
assert.equal(0.1, parseMoney("$.1"));
|
268
|
+
});
|
269
|
+
|
270
|
+
it('"€.1" should be parsed as 0.1 (with a euro sign)', function(){
|
271
|
+
assert.equal(0.1, parseMoney("€.1"));
|
272
|
+
});
|
273
|
+
|
274
|
+
it('"£.1" should be parsed as 0.1 (with a pound sign)', function(){
|
275
|
+
assert.equal(0.1, parseMoney("£.1"));
|
276
|
+
});
|
277
|
+
|
278
|
+
it('"₤.1" should be parsed as 0.1 (with a pound sign)', function(){
|
279
|
+
assert.equal(0.1, parseMoney("₤.1"));
|
280
|
+
});
|
281
|
+
|
282
|
+
it('",1" should be parsed as 0.1 ', function(){
|
283
|
+
assert.equal(0.1, parseMoney(",1"));
|
284
|
+
});
|
285
|
+
|
286
|
+
it('"- ,1" should be parsed as -0.1 (negative amount)', function(){
|
287
|
+
assert.equal(-0.1, parseMoney("- ,1"));
|
288
|
+
});
|
289
|
+
|
290
|
+
it('"$,1" should be parsed as 0.1 (with a dollar sign)', function(){
|
291
|
+
assert.equal(0.1, parseMoney("$,1"));
|
292
|
+
});
|
293
|
+
|
294
|
+
it('"€,1" should be parsed as 0.1 (with a euro sign)', function(){
|
295
|
+
assert.equal(0.1, parseMoney("€,1"));
|
296
|
+
});
|
297
|
+
|
298
|
+
it('"£,1" should be parsed as 0.1 (with a pound sign)', function(){
|
299
|
+
assert.equal(0.1, parseMoney("£,1"));
|
300
|
+
});
|
301
|
+
|
302
|
+
it('"₤,1" should be parsed as 0.1 (with a pound sign)', function(){
|
303
|
+
assert.equal(0.1, parseMoney("₤,1"));
|
304
|
+
});
|
305
|
+
|
306
|
+
it('"0.1" should be parsed as 0.1 ', function(){
|
307
|
+
assert.equal(0.1, parseMoney("0.1"));
|
308
|
+
});
|
309
|
+
|
310
|
+
it('" - 0.1" should be parsed as -0.1 (negative amount)', function(){
|
311
|
+
assert.equal(-0.1, parseMoney(" - 0.1"));
|
312
|
+
});
|
313
|
+
|
314
|
+
it('"o.1" should be parsed as 0.1 (with O instead of 0)', function(){
|
315
|
+
assert.equal(0.1, parseMoney("o.1"));
|
316
|
+
});
|
317
|
+
|
318
|
+
it('"$0.1" should be parsed as 0.1 (with a dollar sign)', function(){
|
319
|
+
assert.equal(0.1, parseMoney("$0.1"));
|
320
|
+
});
|
321
|
+
|
322
|
+
it('"€0.1" should be parsed as 0.1 (with a euro sign)', function(){
|
323
|
+
assert.equal(0.1, parseMoney("€0.1"));
|
324
|
+
});
|
325
|
+
|
326
|
+
it('"£0.1" should be parsed as 0.1 (with a pound sign)', function(){
|
327
|
+
assert.equal(0.1, parseMoney("£0.1"));
|
328
|
+
});
|
329
|
+
|
330
|
+
it('"₤0.1" should be parsed as 0.1 (with a pound sign)', function(){
|
331
|
+
assert.equal(0.1, parseMoney("₤0.1"));
|
332
|
+
});
|
333
|
+
|
334
|
+
it('"0,1" should be parsed as 0.1 ', function(){
|
335
|
+
assert.equal(0.1, parseMoney("0,1"));
|
336
|
+
});
|
337
|
+
|
338
|
+
it('"-0,1" should be parsed as -0.1 (negative amount)', function(){
|
339
|
+
assert.equal(-0.1, parseMoney("-0,1"));
|
340
|
+
});
|
341
|
+
|
342
|
+
it('"o,1" should be parsed as 0.1 (with O instead of 0)', function(){
|
343
|
+
assert.equal(0.1, parseMoney("o,1"));
|
344
|
+
});
|
345
|
+
|
346
|
+
it('"$0,1" should be parsed as 0.1 (with a dollar sign)', function(){
|
347
|
+
assert.equal(0.1, parseMoney("$0,1"));
|
348
|
+
});
|
349
|
+
|
350
|
+
it('"€0,1" should be parsed as 0.1 (with a euro sign)', function(){
|
351
|
+
assert.equal(0.1, parseMoney("€0,1"));
|
352
|
+
});
|
353
|
+
|
354
|
+
it('"£0,1" should be parsed as 0.1 (with a pound sign)', function(){
|
355
|
+
assert.equal(0.1, parseMoney("£0,1"));
|
356
|
+
});
|
357
|
+
|
358
|
+
it('"₤0,1" should be parsed as 0.1 (with a pound sign)', function(){
|
359
|
+
assert.equal(0.1, parseMoney("₤0,1"));
|
360
|
+
});
|
361
|
+
|
362
|
+
it('"2,000.01" should be parsed as 2000.01 ', function(){
|
363
|
+
assert.equal(2000.01, parseMoney("2,000.01"));
|
364
|
+
});
|
365
|
+
|
366
|
+
it('" - 2,000.01" should be parsed as -2000.01 (negative amount)', function(){
|
367
|
+
assert.equal(-2000.01, parseMoney(" - 2,000.01"));
|
368
|
+
});
|
369
|
+
|
370
|
+
it('"2,000.o1" should be parsed as 2000.01 (with O instead of 0)', function(){
|
371
|
+
assert.equal(2000.01, parseMoney("2,000.o1"));
|
372
|
+
});
|
373
|
+
|
374
|
+
it('"$2,000.01" should be parsed as 2000.01 (with a dollar sign)', function(){
|
375
|
+
assert.equal(2000.01, parseMoney("$2,000.01"));
|
376
|
+
});
|
377
|
+
|
378
|
+
it('"€2,000.01" should be parsed as 2000.01 (with a euro sign)', function(){
|
379
|
+
assert.equal(2000.01, parseMoney("€2,000.01"));
|
380
|
+
});
|
381
|
+
|
382
|
+
it('"£2,000.01" should be parsed as 2000.01 (with a pound sign)', function(){
|
383
|
+
assert.equal(2000.01, parseMoney("£2,000.01"));
|
384
|
+
});
|
385
|
+
|
386
|
+
it('"₤2,000.01" should be parsed as 2000.01 (with a pound sign)', function(){
|
387
|
+
assert.equal(2000.01, parseMoney("₤2,000.01"));
|
388
|
+
});
|
389
|
+
|
390
|
+
it('"2.000,01" should be parsed as 2000.01 ', function(){
|
391
|
+
assert.equal(2000.01, parseMoney("2.000,01"));
|
392
|
+
});
|
393
|
+
|
394
|
+
it('" -2.000,01" should be parsed as -2000.01 (negative amount)', function(){
|
395
|
+
assert.equal(-2000.01, parseMoney(" -2.000,01"));
|
396
|
+
});
|
397
|
+
|
398
|
+
it('"2.000,o1" should be parsed as 2000.01 (with O instead of 0)', function(){
|
399
|
+
assert.equal(2000.01, parseMoney("2.000,o1"));
|
400
|
+
});
|
401
|
+
|
402
|
+
it('"$2.000,01" should be parsed as 2000.01 (with a dollar sign)', function(){
|
403
|
+
assert.equal(2000.01, parseMoney("$2.000,01"));
|
404
|
+
});
|
405
|
+
|
406
|
+
it('"€2.000,01" should be parsed as 2000.01 (with a euro sign)', function(){
|
407
|
+
assert.equal(2000.01, parseMoney("€2.000,01"));
|
408
|
+
});
|
409
|
+
|
410
|
+
it('"£2.000,01" should be parsed as 2000.01 (with a pound sign)', function(){
|
411
|
+
assert.equal(2000.01, parseMoney("£2.000,01"));
|
412
|
+
});
|
413
|
+
|
414
|
+
it('"₤2.000,01" should be parsed as 2000.01 (with a pound sign)', function(){
|
415
|
+
assert.equal(2000.01, parseMoney("₤2.000,01"));
|
416
|
+
});
|
417
|
+
|
418
|
+
it('"2 000.01" should be parsed as 2000.01 ', function(){
|
419
|
+
assert.equal(2000.01, parseMoney("2 000.01"));
|
420
|
+
});
|
421
|
+
|
422
|
+
it('"-2 000.01" should be parsed as -2000.01 (negative amount)', function(){
|
423
|
+
assert.equal(-2000.01, parseMoney("-2 000.01"));
|
424
|
+
});
|
425
|
+
|
426
|
+
it('"2 00o.01" should be parsed as 2000.01 (with O instead of 0)', function(){
|
427
|
+
assert.equal(2000.01, parseMoney("2 00o.01"));
|
428
|
+
});
|
429
|
+
|
430
|
+
it('"$2 000.01" should be parsed as 2000.01 (with a dollar sign)', function(){
|
431
|
+
assert.equal(2000.01, parseMoney("$2 000.01"));
|
432
|
+
});
|
433
|
+
|
434
|
+
it('"€2 000.01" should be parsed as 2000.01 (with a euro sign)', function(){
|
435
|
+
assert.equal(2000.01, parseMoney("€2 000.01"));
|
436
|
+
});
|
437
|
+
|
438
|
+
it('"£2 000.01" should be parsed as 2000.01 (with a pound sign)', function(){
|
439
|
+
assert.equal(2000.01, parseMoney("£2 000.01"));
|
440
|
+
});
|
441
|
+
|
442
|
+
it('"₤2 000.01" should be parsed as 2000.01 (with a pound sign)', function(){
|
443
|
+
assert.equal(2000.01, parseMoney("₤2 000.01"));
|
444
|
+
});
|
445
|
+
|
446
|
+
it('"2 000,01" should be parsed as 2000.01 ', function(){
|
447
|
+
assert.equal(2000.01, parseMoney("2 000,01"));
|
448
|
+
});
|
449
|
+
|
450
|
+
it('"- 2 000,01" should be parsed as -2000.01 (negative amount)', function(){
|
451
|
+
assert.equal(-2000.01, parseMoney("- 2 000,01"));
|
452
|
+
});
|
453
|
+
|
454
|
+
it('"2 o00,01" should be parsed as 2000.01 (with O instead of 0)', function(){
|
455
|
+
assert.equal(2000.01, parseMoney("2 o00,01"));
|
456
|
+
});
|
457
|
+
|
458
|
+
it('"$2 000,01" should be parsed as 2000.01 (with a dollar sign)', function(){
|
459
|
+
assert.equal(2000.01, parseMoney("$2 000,01"));
|
460
|
+
});
|
461
|
+
|
462
|
+
it('"€2 000,01" should be parsed as 2000.01 (with a euro sign)', function(){
|
463
|
+
assert.equal(2000.01, parseMoney("€2 000,01"));
|
464
|
+
});
|
465
|
+
|
466
|
+
it('"£2 000,01" should be parsed as 2000.01 (with a pound sign)', function(){
|
467
|
+
assert.equal(2000.01, parseMoney("£2 000,01"));
|
468
|
+
});
|
469
|
+
|
470
|
+
it('"₤2 000,01" should be parsed as 2000.01 (with a pound sign)', function(){
|
471
|
+
assert.equal(2000.01, parseMoney("₤2 000,01"));
|
472
|
+
});
|
473
|
+
|
474
|
+
it('"1,222,000.01" should be parsed as 1222000.01 ', function(){
|
475
|
+
assert.equal(1222000.01, parseMoney("1,222,000.01"));
|
476
|
+
});
|
477
|
+
|
478
|
+
it('" - 1,222,000.01" should be parsed as -1222000.01 (negative amount)', function(){
|
479
|
+
assert.equal(-1222000.01, parseMoney(" - 1,222,000.01"));
|
480
|
+
});
|
481
|
+
|
482
|
+
it('"1,222,o00.01" should be parsed as 1222000.01 (with O instead of 0)', function(){
|
483
|
+
assert.equal(1222000.01, parseMoney("1,222,o00.01"));
|
484
|
+
});
|
485
|
+
|
486
|
+
it('"$1,222,000.01" should be parsed as 1222000.01 (with a dollar sign)', function(){
|
487
|
+
assert.equal(1222000.01, parseMoney("$1,222,000.01"));
|
488
|
+
});
|
489
|
+
|
490
|
+
it('"€1,222,000.01" should be parsed as 1222000.01 (with a euro sign)', function(){
|
491
|
+
assert.equal(1222000.01, parseMoney("€1,222,000.01"));
|
492
|
+
});
|
493
|
+
|
494
|
+
it('"£1,222,000.01" should be parsed as 1222000.01 (with a pound sign)', function(){
|
495
|
+
assert.equal(1222000.01, parseMoney("£1,222,000.01"));
|
496
|
+
});
|
497
|
+
|
498
|
+
it('"₤1,222,000.01" should be parsed as 1222000.01 (with a pound sign)', function(){
|
499
|
+
assert.equal(1222000.01, parseMoney("₤1,222,000.01"));
|
500
|
+
});
|
501
|
+
|
502
|
+
it('"1.222.000,01" should be parsed as 1222000.01 ', function(){
|
503
|
+
assert.equal(1222000.01, parseMoney("1.222.000,01"));
|
504
|
+
});
|
505
|
+
|
506
|
+
it('"-1.222.000,01" should be parsed as -1222000.01 (negative amount)', function(){
|
507
|
+
assert.equal(-1222000.01, parseMoney("-1.222.000,01"));
|
508
|
+
});
|
509
|
+
|
510
|
+
it('"1.222.o00,01" should be parsed as 1222000.01 (with O instead of 0)', function(){
|
511
|
+
assert.equal(1222000.01, parseMoney("1.222.o00,01"));
|
512
|
+
});
|
513
|
+
|
514
|
+
it('"$1.222.000,01" should be parsed as 1222000.01 (with a dollar sign)', function(){
|
515
|
+
assert.equal(1222000.01, parseMoney("$1.222.000,01"));
|
516
|
+
});
|
517
|
+
|
518
|
+
it('"€1.222.000,01" should be parsed as 1222000.01 (with a euro sign)', function(){
|
519
|
+
assert.equal(1222000.01, parseMoney("€1.222.000,01"));
|
520
|
+
});
|
521
|
+
|
522
|
+
it('"£1.222.000,01" should be parsed as 1222000.01 (with a pound sign)', function(){
|
523
|
+
assert.equal(1222000.01, parseMoney("£1.222.000,01"));
|
524
|
+
});
|
525
|
+
|
526
|
+
it('"₤1.222.000,01" should be parsed as 1222000.01 (with a pound sign)', function(){
|
527
|
+
assert.equal(1222000.01, parseMoney("₤1.222.000,01"));
|
528
|
+
});
|
529
|
+
|
530
|
+
it('"1 222 000.01" should be parsed as 1222000.01 ', function(){
|
531
|
+
assert.equal(1222000.01, parseMoney("1 222 000.01"));
|
532
|
+
});
|
533
|
+
|
534
|
+
it('" - 1 222 000.01" should be parsed as -1222000.01 (negative amount)', function(){
|
535
|
+
assert.equal(-1222000.01, parseMoney(" - 1 222 000.01"));
|
536
|
+
});
|
537
|
+
|
538
|
+
it('"1 222 000.o1" should be parsed as 1222000.01 (with O instead of 0)', function(){
|
539
|
+
assert.equal(1222000.01, parseMoney("1 222 000.o1"));
|
540
|
+
});
|
541
|
+
|
542
|
+
it('"$1 222 000.01" should be parsed as 1222000.01 (with a dollar sign)', function(){
|
543
|
+
assert.equal(1222000.01, parseMoney("$1 222 000.01"));
|
544
|
+
});
|
545
|
+
|
546
|
+
it('"€1 222 000.01" should be parsed as 1222000.01 (with a euro sign)', function(){
|
547
|
+
assert.equal(1222000.01, parseMoney("€1 222 000.01"));
|
548
|
+
});
|
549
|
+
|
550
|
+
it('"£1 222 000.01" should be parsed as 1222000.01 (with a pound sign)', function(){
|
551
|
+
assert.equal(1222000.01, parseMoney("£1 222 000.01"));
|
552
|
+
});
|
553
|
+
|
554
|
+
it('"₤1 222 000.01" should be parsed as 1222000.01 (with a pound sign)', function(){
|
555
|
+
assert.equal(1222000.01, parseMoney("₤1 222 000.01"));
|
556
|
+
});
|
557
|
+
|
558
|
+
it('"1 222 000,01" should be parsed as 1222000.01 ', function(){
|
559
|
+
assert.equal(1222000.01, parseMoney("1 222 000,01"));
|
560
|
+
});
|
561
|
+
|
562
|
+
it('" - 1 222 000,01" should be parsed as -1222000.01 (negative amount)', function(){
|
563
|
+
assert.equal(-1222000.01, parseMoney(" - 1 222 000,01"));
|
564
|
+
});
|
565
|
+
|
566
|
+
it('"1 222 000,o1" should be parsed as 1222000.01 (with O instead of 0)', function(){
|
567
|
+
assert.equal(1222000.01, parseMoney("1 222 000,o1"));
|
568
|
+
});
|
569
|
+
|
570
|
+
it('"$1 222 000,01" should be parsed as 1222000.01 (with a dollar sign)', function(){
|
571
|
+
assert.equal(1222000.01, parseMoney("$1 222 000,01"));
|
572
|
+
});
|
573
|
+
|
574
|
+
it('"€1 222 000,01" should be parsed as 1222000.01 (with a euro sign)', function(){
|
575
|
+
assert.equal(1222000.01, parseMoney("€1 222 000,01"));
|
576
|
+
});
|
577
|
+
|
578
|
+
it('"£1 222 000,01" should be parsed as 1222000.01 (with a pound sign)', function(){
|
579
|
+
assert.equal(1222000.01, parseMoney("£1 222 000,01"));
|
580
|
+
});
|
581
|
+
|
582
|
+
it('"₤1 222 000,01" should be parsed as 1222000.01 (with a pound sign)', function(){
|
583
|
+
assert.equal(1222000.01, parseMoney("₤1 222 000,01"));
|
584
|
+
});
|
585
|
+
|
586
|
+
it('"2,000.1" should be parsed as 2000.1 ', function(){
|
587
|
+
assert.equal(2000.1, parseMoney("2,000.1"));
|
588
|
+
});
|
589
|
+
|
590
|
+
it('"-2,000.1" should be parsed as -2000.1 (negative amount)', function(){
|
591
|
+
assert.equal(-2000.1, parseMoney("-2,000.1"));
|
592
|
+
});
|
593
|
+
|
594
|
+
it('"2,0o0.1" should be parsed as 2000.1 (with O instead of 0)', function(){
|
595
|
+
assert.equal(2000.1, parseMoney("2,0o0.1"));
|
596
|
+
});
|
597
|
+
|
598
|
+
it('"$2,000.1" should be parsed as 2000.1 (with a dollar sign)', function(){
|
599
|
+
assert.equal(2000.1, parseMoney("$2,000.1"));
|
600
|
+
});
|
601
|
+
|
602
|
+
it('"€2,000.1" should be parsed as 2000.1 (with a euro sign)', function(){
|
603
|
+
assert.equal(2000.1, parseMoney("€2,000.1"));
|
604
|
+
});
|
605
|
+
|
606
|
+
it('"£2,000.1" should be parsed as 2000.1 (with a pound sign)', function(){
|
607
|
+
assert.equal(2000.1, parseMoney("£2,000.1"));
|
608
|
+
});
|
609
|
+
|
610
|
+
it('"₤2,000.1" should be parsed as 2000.1 (with a pound sign)', function(){
|
611
|
+
assert.equal(2000.1, parseMoney("₤2,000.1"));
|
612
|
+
});
|
613
|
+
|
614
|
+
it('"2.000,1" should be parsed as 2000.1 ', function(){
|
615
|
+
assert.equal(2000.1, parseMoney("2.000,1"));
|
616
|
+
});
|
617
|
+
|
618
|
+
it('"-2.000,1" should be parsed as -2000.1 (negative amount)', function(){
|
619
|
+
assert.equal(-2000.1, parseMoney("-2.000,1"));
|
620
|
+
});
|
621
|
+
|
622
|
+
it('"2.o00,1" should be parsed as 2000.1 (with O instead of 0)', function(){
|
623
|
+
assert.equal(2000.1, parseMoney("2.o00,1"));
|
624
|
+
});
|
625
|
+
|
626
|
+
it('"$2.000,1" should be parsed as 2000.1 (with a dollar sign)', function(){
|
627
|
+
assert.equal(2000.1, parseMoney("$2.000,1"));
|
628
|
+
});
|
629
|
+
|
630
|
+
it('"€2.000,1" should be parsed as 2000.1 (with a euro sign)', function(){
|
631
|
+
assert.equal(2000.1, parseMoney("€2.000,1"));
|
632
|
+
});
|
633
|
+
|
634
|
+
it('"£2.000,1" should be parsed as 2000.1 (with a pound sign)', function(){
|
635
|
+
assert.equal(2000.1, parseMoney("£2.000,1"));
|
636
|
+
});
|
637
|
+
|
638
|
+
it('"₤2.000,1" should be parsed as 2000.1 (with a pound sign)', function(){
|
639
|
+
assert.equal(2000.1, parseMoney("₤2.000,1"));
|
640
|
+
});
|
641
|
+
|
642
|
+
it('"2 000.1" should be parsed as 2000.1 ', function(){
|
643
|
+
assert.equal(2000.1, parseMoney("2 000.1"));
|
644
|
+
});
|
645
|
+
|
646
|
+
it('"- 2 000.1" should be parsed as -2000.1 (negative amount)', function(){
|
647
|
+
assert.equal(-2000.1, parseMoney("- 2 000.1"));
|
648
|
+
});
|
649
|
+
|
650
|
+
it('"2 o00.1" should be parsed as 2000.1 (with O instead of 0)', function(){
|
651
|
+
assert.equal(2000.1, parseMoney("2 o00.1"));
|
652
|
+
});
|
653
|
+
|
654
|
+
it('"$2 000.1" should be parsed as 2000.1 (with a dollar sign)', function(){
|
655
|
+
assert.equal(2000.1, parseMoney("$2 000.1"));
|
656
|
+
});
|
657
|
+
|
658
|
+
it('"€2 000.1" should be parsed as 2000.1 (with a euro sign)', function(){
|
659
|
+
assert.equal(2000.1, parseMoney("€2 000.1"));
|
660
|
+
});
|
661
|
+
|
662
|
+
it('"£2 000.1" should be parsed as 2000.1 (with a pound sign)', function(){
|
663
|
+
assert.equal(2000.1, parseMoney("£2 000.1"));
|
664
|
+
});
|
665
|
+
|
666
|
+
it('"₤2 000.1" should be parsed as 2000.1 (with a pound sign)', function(){
|
667
|
+
assert.equal(2000.1, parseMoney("₤2 000.1"));
|
668
|
+
});
|
669
|
+
|
670
|
+
it('"2 000,1" should be parsed as 2000.1 ', function(){
|
671
|
+
assert.equal(2000.1, parseMoney("2 000,1"));
|
672
|
+
});
|
673
|
+
|
674
|
+
it('" - 2 000,1" should be parsed as -2000.1 (negative amount)', function(){
|
675
|
+
assert.equal(-2000.1, parseMoney(" - 2 000,1"));
|
676
|
+
});
|
677
|
+
|
678
|
+
it('"2 0o0,1" should be parsed as 2000.1 (with O instead of 0)', function(){
|
679
|
+
assert.equal(2000.1, parseMoney("2 0o0,1"));
|
680
|
+
});
|
681
|
+
|
682
|
+
it('"$2 000,1" should be parsed as 2000.1 (with a dollar sign)', function(){
|
683
|
+
assert.equal(2000.1, parseMoney("$2 000,1"));
|
684
|
+
});
|
685
|
+
|
686
|
+
it('"€2 000,1" should be parsed as 2000.1 (with a euro sign)', function(){
|
687
|
+
assert.equal(2000.1, parseMoney("€2 000,1"));
|
688
|
+
});
|
689
|
+
|
690
|
+
it('"£2 000,1" should be parsed as 2000.1 (with a pound sign)', function(){
|
691
|
+
assert.equal(2000.1, parseMoney("£2 000,1"));
|
692
|
+
});
|
693
|
+
|
694
|
+
it('"₤2 000,1" should be parsed as 2000.1 (with a pound sign)', function(){
|
695
|
+
assert.equal(2000.1, parseMoney("₤2 000,1"));
|
696
|
+
});
|
697
|
+
|
698
|
+
it('"1,222,000.1" should be parsed as 1222000.1 ', function(){
|
699
|
+
assert.equal(1222000.1, parseMoney("1,222,000.1"));
|
700
|
+
});
|
701
|
+
|
702
|
+
it('"- 1,222,000.1" should be parsed as -1222000.1 (negative amount)', function(){
|
703
|
+
assert.equal(-1222000.1, parseMoney("- 1,222,000.1"));
|
704
|
+
});
|
705
|
+
|
706
|
+
it('"1,222,00o.1" should be parsed as 1222000.1 (with O instead of 0)', function(){
|
707
|
+
assert.equal(1222000.1, parseMoney("1,222,00o.1"));
|
708
|
+
});
|
709
|
+
|
710
|
+
it('"$1,222,000.1" should be parsed as 1222000.1 (with a dollar sign)', function(){
|
711
|
+
assert.equal(1222000.1, parseMoney("$1,222,000.1"));
|
712
|
+
});
|
713
|
+
|
714
|
+
it('"€1,222,000.1" should be parsed as 1222000.1 (with a euro sign)', function(){
|
715
|
+
assert.equal(1222000.1, parseMoney("€1,222,000.1"));
|
716
|
+
});
|
717
|
+
|
718
|
+
it('"£1,222,000.1" should be parsed as 1222000.1 (with a pound sign)', function(){
|
719
|
+
assert.equal(1222000.1, parseMoney("£1,222,000.1"));
|
720
|
+
});
|
721
|
+
|
722
|
+
it('"₤1,222,000.1" should be parsed as 1222000.1 (with a pound sign)', function(){
|
723
|
+
assert.equal(1222000.1, parseMoney("₤1,222,000.1"));
|
724
|
+
});
|
725
|
+
|
726
|
+
it('"1.222.000,1" should be parsed as 1222000.1 ', function(){
|
727
|
+
assert.equal(1222000.1, parseMoney("1.222.000,1"));
|
728
|
+
});
|
729
|
+
|
730
|
+
it('"- 1.222.000,1" should be parsed as -1222000.1 (negative amount)', function(){
|
731
|
+
assert.equal(-1222000.1, parseMoney("- 1.222.000,1"));
|
732
|
+
});
|
733
|
+
|
734
|
+
it('"1.222.0o0,1" should be parsed as 1222000.1 (with O instead of 0)', function(){
|
735
|
+
assert.equal(1222000.1, parseMoney("1.222.0o0,1"));
|
736
|
+
});
|
737
|
+
|
738
|
+
it('"$1.222.000,1" should be parsed as 1222000.1 (with a dollar sign)', function(){
|
739
|
+
assert.equal(1222000.1, parseMoney("$1.222.000,1"));
|
740
|
+
});
|
741
|
+
|
742
|
+
it('"€1.222.000,1" should be parsed as 1222000.1 (with a euro sign)', function(){
|
743
|
+
assert.equal(1222000.1, parseMoney("€1.222.000,1"));
|
744
|
+
});
|
745
|
+
|
746
|
+
it('"£1.222.000,1" should be parsed as 1222000.1 (with a pound sign)', function(){
|
747
|
+
assert.equal(1222000.1, parseMoney("£1.222.000,1"));
|
748
|
+
});
|
749
|
+
|
750
|
+
it('"₤1.222.000,1" should be parsed as 1222000.1 (with a pound sign)', function(){
|
751
|
+
assert.equal(1222000.1, parseMoney("₤1.222.000,1"));
|
752
|
+
});
|
753
|
+
|
754
|
+
it('"1 222 000.1" should be parsed as 1222000.1 ', function(){
|
755
|
+
assert.equal(1222000.1, parseMoney("1 222 000.1"));
|
756
|
+
});
|
757
|
+
|
758
|
+
it('" - 1 222 000.1" should be parsed as -1222000.1 (negative amount)', function(){
|
759
|
+
assert.equal(-1222000.1, parseMoney(" - 1 222 000.1"));
|
760
|
+
});
|
761
|
+
|
762
|
+
it('"1 222 00o.1" should be parsed as 1222000.1 (with O instead of 0)', function(){
|
763
|
+
assert.equal(1222000.1, parseMoney("1 222 00o.1"));
|
764
|
+
});
|
765
|
+
|
766
|
+
it('"$1 222 000.1" should be parsed as 1222000.1 (with a dollar sign)', function(){
|
767
|
+
assert.equal(1222000.1, parseMoney("$1 222 000.1"));
|
768
|
+
});
|
769
|
+
|
770
|
+
it('"€1 222 000.1" should be parsed as 1222000.1 (with a euro sign)', function(){
|
771
|
+
assert.equal(1222000.1, parseMoney("€1 222 000.1"));
|
772
|
+
});
|
773
|
+
|
774
|
+
it('"£1 222 000.1" should be parsed as 1222000.1 (with a pound sign)', function(){
|
775
|
+
assert.equal(1222000.1, parseMoney("£1 222 000.1"));
|
776
|
+
});
|
777
|
+
|
778
|
+
it('"₤1 222 000.1" should be parsed as 1222000.1 (with a pound sign)', function(){
|
779
|
+
assert.equal(1222000.1, parseMoney("₤1 222 000.1"));
|
780
|
+
});
|
781
|
+
|
782
|
+
it('"1 222 000,1" should be parsed as 1222000.1 ', function(){
|
783
|
+
assert.equal(1222000.1, parseMoney("1 222 000,1"));
|
784
|
+
});
|
785
|
+
|
786
|
+
it('" - 1 222 000,1" should be parsed as -1222000.1 (negative amount)', function(){
|
787
|
+
assert.equal(-1222000.1, parseMoney(" - 1 222 000,1"));
|
788
|
+
});
|
789
|
+
|
790
|
+
it('"1 222 00o,1" should be parsed as 1222000.1 (with O instead of 0)', function(){
|
791
|
+
assert.equal(1222000.1, parseMoney("1 222 00o,1"));
|
792
|
+
});
|
793
|
+
|
794
|
+
it('"$1 222 000,1" should be parsed as 1222000.1 (with a dollar sign)', function(){
|
795
|
+
assert.equal(1222000.1, parseMoney("$1 222 000,1"));
|
796
|
+
});
|
797
|
+
|
798
|
+
it('"€1 222 000,1" should be parsed as 1222000.1 (with a euro sign)', function(){
|
799
|
+
assert.equal(1222000.1, parseMoney("€1 222 000,1"));
|
800
|
+
});
|
801
|
+
|
802
|
+
it('"£1 222 000,1" should be parsed as 1222000.1 (with a pound sign)', function(){
|
803
|
+
assert.equal(1222000.1, parseMoney("£1 222 000,1"));
|
804
|
+
});
|
805
|
+
|
806
|
+
it('"₤1 222 000,1" should be parsed as 1222000.1 (with a pound sign)', function(){
|
807
|
+
assert.equal(1222000.1, parseMoney("₤1 222 000,1"));
|
808
|
+
});
|
809
|
+
|
810
|
+
it('"2,000.10" should be parsed as 2000.1 ', function(){
|
811
|
+
assert.equal(2000.1, parseMoney("2,000.10"));
|
812
|
+
});
|
813
|
+
|
814
|
+
it('"- 2,000.10" should be parsed as -2000.1 (negative amount)', function(){
|
815
|
+
assert.equal(-2000.1, parseMoney("- 2,000.10"));
|
816
|
+
});
|
817
|
+
|
818
|
+
it('"2,000.1o" should be parsed as 2000.1 (with O instead of 0)', function(){
|
819
|
+
assert.equal(2000.1, parseMoney("2,000.1o"));
|
820
|
+
});
|
821
|
+
|
822
|
+
it('"$2,000.10" should be parsed as 2000.1 (with a dollar sign)', function(){
|
823
|
+
assert.equal(2000.1, parseMoney("$2,000.10"));
|
824
|
+
});
|
825
|
+
|
826
|
+
it('"€2,000.10" should be parsed as 2000.1 (with a euro sign)', function(){
|
827
|
+
assert.equal(2000.1, parseMoney("€2,000.10"));
|
828
|
+
});
|
829
|
+
|
830
|
+
it('"£2,000.10" should be parsed as 2000.1 (with a pound sign)', function(){
|
831
|
+
assert.equal(2000.1, parseMoney("£2,000.10"));
|
832
|
+
});
|
833
|
+
|
834
|
+
it('"₤2,000.10" should be parsed as 2000.1 (with a pound sign)', function(){
|
835
|
+
assert.equal(2000.1, parseMoney("₤2,000.10"));
|
836
|
+
});
|
837
|
+
|
838
|
+
it('"2.000,10" should be parsed as 2000.1 ', function(){
|
839
|
+
assert.equal(2000.1, parseMoney("2.000,10"));
|
840
|
+
});
|
841
|
+
|
842
|
+
it('"- 2.000,10" should be parsed as -2000.1 (negative amount)', function(){
|
843
|
+
assert.equal(-2000.1, parseMoney("- 2.000,10"));
|
844
|
+
});
|
845
|
+
|
846
|
+
it('"2.00o,10" should be parsed as 2000.1 (with O instead of 0)', function(){
|
847
|
+
assert.equal(2000.1, parseMoney("2.00o,10"));
|
848
|
+
});
|
849
|
+
|
850
|
+
it('"$2.000,10" should be parsed as 2000.1 (with a dollar sign)', function(){
|
851
|
+
assert.equal(2000.1, parseMoney("$2.000,10"));
|
852
|
+
});
|
853
|
+
|
854
|
+
it('"€2.000,10" should be parsed as 2000.1 (with a euro sign)', function(){
|
855
|
+
assert.equal(2000.1, parseMoney("€2.000,10"));
|
856
|
+
});
|
857
|
+
|
858
|
+
it('"£2.000,10" should be parsed as 2000.1 (with a pound sign)', function(){
|
859
|
+
assert.equal(2000.1, parseMoney("£2.000,10"));
|
860
|
+
});
|
861
|
+
|
862
|
+
it('"₤2.000,10" should be parsed as 2000.1 (with a pound sign)', function(){
|
863
|
+
assert.equal(2000.1, parseMoney("₤2.000,10"));
|
864
|
+
});
|
865
|
+
|
866
|
+
it('"2 000.10" should be parsed as 2000.1 ', function(){
|
867
|
+
assert.equal(2000.1, parseMoney("2 000.10"));
|
868
|
+
});
|
869
|
+
|
870
|
+
it('"- 2 000.10" should be parsed as -2000.1 (negative amount)', function(){
|
871
|
+
assert.equal(-2000.1, parseMoney("- 2 000.10"));
|
872
|
+
});
|
873
|
+
|
874
|
+
it('"2 o00.10" should be parsed as 2000.1 (with O instead of 0)', function(){
|
875
|
+
assert.equal(2000.1, parseMoney("2 o00.10"));
|
876
|
+
});
|
877
|
+
|
878
|
+
it('"$2 000.10" should be parsed as 2000.1 (with a dollar sign)', function(){
|
879
|
+
assert.equal(2000.1, parseMoney("$2 000.10"));
|
880
|
+
});
|
881
|
+
|
882
|
+
it('"€2 000.10" should be parsed as 2000.1 (with a euro sign)', function(){
|
883
|
+
assert.equal(2000.1, parseMoney("€2 000.10"));
|
884
|
+
});
|
885
|
+
|
886
|
+
it('"£2 000.10" should be parsed as 2000.1 (with a pound sign)', function(){
|
887
|
+
assert.equal(2000.1, parseMoney("£2 000.10"));
|
888
|
+
});
|
889
|
+
|
890
|
+
it('"₤2 000.10" should be parsed as 2000.1 (with a pound sign)', function(){
|
891
|
+
assert.equal(2000.1, parseMoney("₤2 000.10"));
|
892
|
+
});
|
893
|
+
|
894
|
+
it('"2 000,10" should be parsed as 2000.1 ', function(){
|
895
|
+
assert.equal(2000.1, parseMoney("2 000,10"));
|
896
|
+
});
|
897
|
+
|
898
|
+
it('" - 2 000,10" should be parsed as -2000.1 (negative amount)', function(){
|
899
|
+
assert.equal(-2000.1, parseMoney(" - 2 000,10"));
|
900
|
+
});
|
901
|
+
|
902
|
+
it('"2 000,1o" should be parsed as 2000.1 (with O instead of 0)', function(){
|
903
|
+
assert.equal(2000.1, parseMoney("2 000,1o"));
|
904
|
+
});
|
905
|
+
|
906
|
+
it('"$2 000,10" should be parsed as 2000.1 (with a dollar sign)', function(){
|
907
|
+
assert.equal(2000.1, parseMoney("$2 000,10"));
|
908
|
+
});
|
909
|
+
|
910
|
+
it('"€2 000,10" should be parsed as 2000.1 (with a euro sign)', function(){
|
911
|
+
assert.equal(2000.1, parseMoney("€2 000,10"));
|
912
|
+
});
|
913
|
+
|
914
|
+
it('"£2 000,10" should be parsed as 2000.1 (with a pound sign)', function(){
|
915
|
+
assert.equal(2000.1, parseMoney("£2 000,10"));
|
916
|
+
});
|
917
|
+
|
918
|
+
it('"₤2 000,10" should be parsed as 2000.1 (with a pound sign)', function(){
|
919
|
+
assert.equal(2000.1, parseMoney("₤2 000,10"));
|
920
|
+
});
|
921
|
+
|
922
|
+
it('"1,222,000.10" should be parsed as 1222000.1 ', function(){
|
923
|
+
assert.equal(1222000.1, parseMoney("1,222,000.10"));
|
924
|
+
});
|
925
|
+
|
926
|
+
it('" - 1,222,000.10" should be parsed as -1222000.1 (negative amount)', function(){
|
927
|
+
assert.equal(-1222000.1, parseMoney(" - 1,222,000.10"));
|
928
|
+
});
|
929
|
+
|
930
|
+
it('"1,222,000.1o" should be parsed as 1222000.1 (with O instead of 0)', function(){
|
931
|
+
assert.equal(1222000.1, parseMoney("1,222,000.1o"));
|
932
|
+
});
|
933
|
+
|
934
|
+
it('"$1,222,000.10" should be parsed as 1222000.1 (with a dollar sign)', function(){
|
935
|
+
assert.equal(1222000.1, parseMoney("$1,222,000.10"));
|
936
|
+
});
|
937
|
+
|
938
|
+
it('"€1,222,000.10" should be parsed as 1222000.1 (with a euro sign)', function(){
|
939
|
+
assert.equal(1222000.1, parseMoney("€1,222,000.10"));
|
940
|
+
});
|
941
|
+
|
942
|
+
it('"£1,222,000.10" should be parsed as 1222000.1 (with a pound sign)', function(){
|
943
|
+
assert.equal(1222000.1, parseMoney("£1,222,000.10"));
|
944
|
+
});
|
945
|
+
|
946
|
+
it('"₤1,222,000.10" should be parsed as 1222000.1 (with a pound sign)', function(){
|
947
|
+
assert.equal(1222000.1, parseMoney("₤1,222,000.10"));
|
948
|
+
});
|
949
|
+
|
950
|
+
it('"1.222.000,10" should be parsed as 1222000.1 ', function(){
|
951
|
+
assert.equal(1222000.1, parseMoney("1.222.000,10"));
|
952
|
+
});
|
953
|
+
|
954
|
+
it('"-1.222.000,10" should be parsed as -1222000.1 (negative amount)', function(){
|
955
|
+
assert.equal(-1222000.1, parseMoney("-1.222.000,10"));
|
956
|
+
});
|
957
|
+
|
958
|
+
it('"1.222.00o,10" should be parsed as 1222000.1 (with O instead of 0)', function(){
|
959
|
+
assert.equal(1222000.1, parseMoney("1.222.00o,10"));
|
960
|
+
});
|
961
|
+
|
962
|
+
it('"$1.222.000,10" should be parsed as 1222000.1 (with a dollar sign)', function(){
|
963
|
+
assert.equal(1222000.1, parseMoney("$1.222.000,10"));
|
964
|
+
});
|
965
|
+
|
966
|
+
it('"€1.222.000,10" should be parsed as 1222000.1 (with a euro sign)', function(){
|
967
|
+
assert.equal(1222000.1, parseMoney("€1.222.000,10"));
|
968
|
+
});
|
969
|
+
|
970
|
+
it('"£1.222.000,10" should be parsed as 1222000.1 (with a pound sign)', function(){
|
971
|
+
assert.equal(1222000.1, parseMoney("£1.222.000,10"));
|
972
|
+
});
|
973
|
+
|
974
|
+
it('"₤1.222.000,10" should be parsed as 1222000.1 (with a pound sign)', function(){
|
975
|
+
assert.equal(1222000.1, parseMoney("₤1.222.000,10"));
|
976
|
+
});
|
977
|
+
|
978
|
+
it('"1 222 000.10" should be parsed as 1222000.1 ', function(){
|
979
|
+
assert.equal(1222000.1, parseMoney("1 222 000.10"));
|
980
|
+
});
|
981
|
+
|
982
|
+
it('" -1 222 000.10" should be parsed as -1222000.1 (negative amount)', function(){
|
983
|
+
assert.equal(-1222000.1, parseMoney(" -1 222 000.10"));
|
984
|
+
});
|
985
|
+
|
986
|
+
it('"1 222 0o0.10" should be parsed as 1222000.1 (with O instead of 0)', function(){
|
987
|
+
assert.equal(1222000.1, parseMoney("1 222 0o0.10"));
|
988
|
+
});
|
989
|
+
|
990
|
+
it('"$1 222 000.10" should be parsed as 1222000.1 (with a dollar sign)', function(){
|
991
|
+
assert.equal(1222000.1, parseMoney("$1 222 000.10"));
|
992
|
+
});
|
993
|
+
|
994
|
+
it('"€1 222 000.10" should be parsed as 1222000.1 (with a euro sign)', function(){
|
995
|
+
assert.equal(1222000.1, parseMoney("€1 222 000.10"));
|
996
|
+
});
|
997
|
+
|
998
|
+
it('"£1 222 000.10" should be parsed as 1222000.1 (with a pound sign)', function(){
|
999
|
+
assert.equal(1222000.1, parseMoney("£1 222 000.10"));
|
1000
|
+
});
|
1001
|
+
|
1002
|
+
it('"₤1 222 000.10" should be parsed as 1222000.1 (with a pound sign)', function(){
|
1003
|
+
assert.equal(1222000.1, parseMoney("₤1 222 000.10"));
|
1004
|
+
});
|
1005
|
+
|
1006
|
+
it('"1 222 000,10" should be parsed as 1222000.1 ', function(){
|
1007
|
+
assert.equal(1222000.1, parseMoney("1 222 000,10"));
|
1008
|
+
});
|
1009
|
+
|
1010
|
+
it('" -1 222 000,10" should be parsed as -1222000.1 (negative amount)', function(){
|
1011
|
+
assert.equal(-1222000.1, parseMoney(" -1 222 000,10"));
|
1012
|
+
});
|
1013
|
+
|
1014
|
+
it('"1 222 o00,10" should be parsed as 1222000.1 (with O instead of 0)', function(){
|
1015
|
+
assert.equal(1222000.1, parseMoney("1 222 o00,10"));
|
1016
|
+
});
|
1017
|
+
|
1018
|
+
it('"$1 222 000,10" should be parsed as 1222000.1 (with a dollar sign)', function(){
|
1019
|
+
assert.equal(1222000.1, parseMoney("$1 222 000,10"));
|
1020
|
+
});
|
1021
|
+
|
1022
|
+
it('"€1 222 000,10" should be parsed as 1222000.1 (with a euro sign)', function(){
|
1023
|
+
assert.equal(1222000.1, parseMoney("€1 222 000,10"));
|
1024
|
+
});
|
1025
|
+
|
1026
|
+
it('"£1 222 000,10" should be parsed as 1222000.1 (with a pound sign)', function(){
|
1027
|
+
assert.equal(1222000.1, parseMoney("£1 222 000,10"));
|
1028
|
+
});
|
1029
|
+
|
1030
|
+
it('"₤1 222 000,10" should be parsed as 1222000.1 (with a pound sign)', function(){
|
1031
|
+
assert.equal(1222000.1, parseMoney("₤1 222 000,10"));
|
1032
|
+
});
|
1033
|
+
|
1034
|
+
it('"1 222 000" should be parsed as 1222000.0 ', function(){
|
1035
|
+
assert.equal(1222000.0, parseMoney("1 222 000"));
|
1036
|
+
});
|
1037
|
+
|
1038
|
+
it('"-1 222 000" should be parsed as -1222000.0 (negative amount)', function(){
|
1039
|
+
assert.equal(-1222000.0, parseMoney("-1 222 000"));
|
1040
|
+
});
|
1041
|
+
|
1042
|
+
it('"1 222 o00" should be parsed as 1222000.0 (with O instead of 0)', function(){
|
1043
|
+
assert.equal(1222000.0, parseMoney("1 222 o00"));
|
1044
|
+
});
|
1045
|
+
|
1046
|
+
it('"$1 222 000" should be parsed as 1222000.0 (with a dollar sign)', function(){
|
1047
|
+
assert.equal(1222000.0, parseMoney("$1 222 000"));
|
1048
|
+
});
|
1049
|
+
|
1050
|
+
it('"€1 222 000" should be parsed as 1222000.0 (with a euro sign)', function(){
|
1051
|
+
assert.equal(1222000.0, parseMoney("€1 222 000"));
|
1052
|
+
});
|
1053
|
+
|
1054
|
+
it('"£1 222 000" should be parsed as 1222000.0 (with a pound sign)', function(){
|
1055
|
+
assert.equal(1222000.0, parseMoney("£1 222 000"));
|
1056
|
+
});
|
1057
|
+
|
1058
|
+
it('"₤1 222 000" should be parsed as 1222000.0 (with a pound sign)', function(){
|
1059
|
+
assert.equal(1222000.0, parseMoney("₤1 222 000"));
|
1060
|
+
});
|
1061
|
+
|
1062
|
+
it('"1 222 000" should be parsed as 1222000.0 ', function(){
|
1063
|
+
assert.equal(1222000.0, parseMoney("1 222 000"));
|
1064
|
+
});
|
1065
|
+
|
1066
|
+
it('"- 1 222 000" should be parsed as -1222000.0 (negative amount)', function(){
|
1067
|
+
assert.equal(-1222000.0, parseMoney("- 1 222 000"));
|
1068
|
+
});
|
1069
|
+
|
1070
|
+
it('"1 222 00o" should be parsed as 1222000.0 (with O instead of 0)', function(){
|
1071
|
+
assert.equal(1222000.0, parseMoney("1 222 00o"));
|
1072
|
+
});
|
1073
|
+
|
1074
|
+
it('"$1 222 000" should be parsed as 1222000.0 (with a dollar sign)', function(){
|
1075
|
+
assert.equal(1222000.0, parseMoney("$1 222 000"));
|
1076
|
+
});
|
1077
|
+
|
1078
|
+
it('"€1 222 000" should be parsed as 1222000.0 (with a euro sign)', function(){
|
1079
|
+
assert.equal(1222000.0, parseMoney("€1 222 000"));
|
1080
|
+
});
|
1081
|
+
|
1082
|
+
it('"£1 222 000" should be parsed as 1222000.0 (with a pound sign)', function(){
|
1083
|
+
assert.equal(1222000.0, parseMoney("£1 222 000"));
|
1084
|
+
});
|
1085
|
+
|
1086
|
+
it('"₤1 222 000" should be parsed as 1222000.0 (with a pound sign)', function(){
|
1087
|
+
assert.equal(1222000.0, parseMoney("₤1 222 000"));
|
1088
|
+
});
|
1089
|
+
|
1090
|
+
it('"1,222,000" should be parsed as 1222000.0 ', function(){
|
1091
|
+
assert.equal(1222000.0, parseMoney("1,222,000"));
|
1092
|
+
});
|
1093
|
+
|
1094
|
+
it('" - 1,222,000" should be parsed as -1222000.0 (negative amount)', function(){
|
1095
|
+
assert.equal(-1222000.0, parseMoney(" - 1,222,000"));
|
1096
|
+
});
|
1097
|
+
|
1098
|
+
it('"1,222,0o0" should be parsed as 1222000.0 (with O instead of 0)', function(){
|
1099
|
+
assert.equal(1222000.0, parseMoney("1,222,0o0"));
|
1100
|
+
});
|
1101
|
+
|
1102
|
+
it('"$1,222,000" should be parsed as 1222000.0 (with a dollar sign)', function(){
|
1103
|
+
assert.equal(1222000.0, parseMoney("$1,222,000"));
|
1104
|
+
});
|
1105
|
+
|
1106
|
+
it('"€1,222,000" should be parsed as 1222000.0 (with a euro sign)', function(){
|
1107
|
+
assert.equal(1222000.0, parseMoney("€1,222,000"));
|
1108
|
+
});
|
1109
|
+
|
1110
|
+
it('"£1,222,000" should be parsed as 1222000.0 (with a pound sign)', function(){
|
1111
|
+
assert.equal(1222000.0, parseMoney("£1,222,000"));
|
1112
|
+
});
|
1113
|
+
|
1114
|
+
it('"₤1,222,000" should be parsed as 1222000.0 (with a pound sign)', function(){
|
1115
|
+
assert.equal(1222000.0, parseMoney("₤1,222,000"));
|
1116
|
+
});
|
1117
|
+
|
1118
|
+
it('"1.222.000" should be parsed as 1222000.0 ', function(){
|
1119
|
+
assert.equal(1222000.0, parseMoney("1.222.000"));
|
1120
|
+
});
|
1121
|
+
|
1122
|
+
it('" -1.222.000" should be parsed as -1222000.0 (negative amount)', function(){
|
1123
|
+
assert.equal(-1222000.0, parseMoney(" -1.222.000"));
|
1124
|
+
});
|
1125
|
+
|
1126
|
+
it('"1.222.o00" should be parsed as 1222000.0 (with O instead of 0)', function(){
|
1127
|
+
assert.equal(1222000.0, parseMoney("1.222.o00"));
|
1128
|
+
});
|
1129
|
+
|
1130
|
+
it('"$1.222.000" should be parsed as 1222000.0 (with a dollar sign)', function(){
|
1131
|
+
assert.equal(1222000.0, parseMoney("$1.222.000"));
|
1132
|
+
});
|
1133
|
+
|
1134
|
+
it('"€1.222.000" should be parsed as 1222000.0 (with a euro sign)', function(){
|
1135
|
+
assert.equal(1222000.0, parseMoney("€1.222.000"));
|
1136
|
+
});
|
1137
|
+
|
1138
|
+
it('"£1.222.000" should be parsed as 1222000.0 (with a pound sign)', function(){
|
1139
|
+
assert.equal(1222000.0, parseMoney("£1.222.000"));
|
1140
|
+
});
|
1141
|
+
|
1142
|
+
it('"₤1.222.000" should be parsed as 1222000.0 (with a pound sign)', function(){
|
1143
|
+
assert.equal(1222000.0, parseMoney("₤1.222.000"));
|
1144
|
+
});
|
1145
|
+
|
1146
|
+
it('"1 222 000" should be parsed as 1222000.0 ', function(){
|
1147
|
+
assert.equal(1222000.0, parseMoney("1 222 000"));
|
1148
|
+
});
|
1149
|
+
|
1150
|
+
it('" -1 222 000" should be parsed as -1222000.0 (negative amount)', function(){
|
1151
|
+
assert.equal(-1222000.0, parseMoney(" -1 222 000"));
|
1152
|
+
});
|
1153
|
+
|
1154
|
+
it('"1 222 o00" should be parsed as 1222000.0 (with O instead of 0)', function(){
|
1155
|
+
assert.equal(1222000.0, parseMoney("1 222 o00"));
|
1156
|
+
});
|
1157
|
+
|
1158
|
+
it('"$1 222 000" should be parsed as 1222000.0 (with a dollar sign)', function(){
|
1159
|
+
assert.equal(1222000.0, parseMoney("$1 222 000"));
|
1160
|
+
});
|
1161
|
+
|
1162
|
+
it('"€1 222 000" should be parsed as 1222000.0 (with a euro sign)', function(){
|
1163
|
+
assert.equal(1222000.0, parseMoney("€1 222 000"));
|
1164
|
+
});
|
1165
|
+
|
1166
|
+
it('"£1 222 000" should be parsed as 1222000.0 (with a pound sign)', function(){
|
1167
|
+
assert.equal(1222000.0, parseMoney("£1 222 000"));
|
1168
|
+
});
|
1169
|
+
|
1170
|
+
it('"₤1 222 000" should be parsed as 1222000.0 (with a pound sign)', function(){
|
1171
|
+
assert.equal(1222000.0, parseMoney("₤1 222 000"));
|
1172
|
+
});
|
1173
|
+
|
1174
|
+
it('"1 222 000" should be parsed as 1222000.0 ', function(){
|
1175
|
+
assert.equal(1222000.0, parseMoney("1 222 000"));
|
1176
|
+
});
|
1177
|
+
|
1178
|
+
it('"- 1 222 000" should be parsed as -1222000.0 (negative amount)', function(){
|
1179
|
+
assert.equal(-1222000.0, parseMoney("- 1 222 000"));
|
1180
|
+
});
|
1181
|
+
|
1182
|
+
it('"1 222 00o" should be parsed as 1222000.0 (with O instead of 0)', function(){
|
1183
|
+
assert.equal(1222000.0, parseMoney("1 222 00o"));
|
1184
|
+
});
|
1185
|
+
|
1186
|
+
it('"$1 222 000" should be parsed as 1222000.0 (with a dollar sign)', function(){
|
1187
|
+
assert.equal(1222000.0, parseMoney("$1 222 000"));
|
1188
|
+
});
|
1189
|
+
|
1190
|
+
it('"€1 222 000" should be parsed as 1222000.0 (with a euro sign)', function(){
|
1191
|
+
assert.equal(1222000.0, parseMoney("€1 222 000"));
|
1192
|
+
});
|
1193
|
+
|
1194
|
+
it('"£1 222 000" should be parsed as 1222000.0 (with a pound sign)', function(){
|
1195
|
+
assert.equal(1222000.0, parseMoney("£1 222 000"));
|
1196
|
+
});
|
1197
|
+
|
1198
|
+
it('"₤1 222 000" should be parsed as 1222000.0 (with a pound sign)', function(){
|
1199
|
+
assert.equal(1222000.0, parseMoney("₤1 222 000"));
|
1200
|
+
});
|
1201
|
+
|
1202
|
+
it('"2,123" should be parsed as 2123.0 ', function(){
|
1203
|
+
assert.equal(2123.0, parseMoney("2,123"));
|
1204
|
+
});
|
1205
|
+
|
1206
|
+
it('"- 2,123" should be parsed as -2123.0 (negative amount)', function(){
|
1207
|
+
assert.equal(-2123.0, parseMoney("- 2,123"));
|
1208
|
+
});
|
1209
|
+
|
1210
|
+
it('"$2,123" should be parsed as 2123.0 (with a dollar sign)', function(){
|
1211
|
+
assert.equal(2123.0, parseMoney("$2,123"));
|
1212
|
+
});
|
1213
|
+
|
1214
|
+
it('"€2,123" should be parsed as 2123.0 (with a euro sign)', function(){
|
1215
|
+
assert.equal(2123.0, parseMoney("€2,123"));
|
1216
|
+
});
|
1217
|
+
|
1218
|
+
it('"£2,123" should be parsed as 2123.0 (with a pound sign)', function(){
|
1219
|
+
assert.equal(2123.0, parseMoney("£2,123"));
|
1220
|
+
});
|
1221
|
+
|
1222
|
+
it('"₤2,123" should be parsed as 2123.0 (with a pound sign)', function(){
|
1223
|
+
assert.equal(2123.0, parseMoney("₤2,123"));
|
1224
|
+
});
|
1225
|
+
|
1226
|
+
it('"2.123" should be parsed as 2123.0 ', function(){
|
1227
|
+
assert.equal(2123.0, parseMoney("2.123"));
|
1228
|
+
});
|
1229
|
+
|
1230
|
+
it('" - 2.123" should be parsed as -2123.0 (negative amount)', function(){
|
1231
|
+
assert.equal(-2123.0, parseMoney(" - 2.123"));
|
1232
|
+
});
|
1233
|
+
|
1234
|
+
it('"$2.123" should be parsed as 2123.0 (with a dollar sign)', function(){
|
1235
|
+
assert.equal(2123.0, parseMoney("$2.123"));
|
1236
|
+
});
|
1237
|
+
|
1238
|
+
it('"€2.123" should be parsed as 2123.0 (with a euro sign)', function(){
|
1239
|
+
assert.equal(2123.0, parseMoney("€2.123"));
|
1240
|
+
});
|
1241
|
+
|
1242
|
+
it('"£2.123" should be parsed as 2123.0 (with a pound sign)', function(){
|
1243
|
+
assert.equal(2123.0, parseMoney("£2.123"));
|
1244
|
+
});
|
1245
|
+
|
1246
|
+
it('"₤2.123" should be parsed as 2123.0 (with a pound sign)', function(){
|
1247
|
+
assert.equal(2123.0, parseMoney("₤2.123"));
|
1248
|
+
});
|
1249
|
+
|
1250
|
+
it('"2,12" should be parsed as 2.12 ', function(){
|
1251
|
+
assert.equal(2.12, parseMoney("2,12"));
|
1252
|
+
});
|
1253
|
+
|
1254
|
+
it('"- 2,12" should be parsed as -2.12 (negative amount)', function(){
|
1255
|
+
assert.equal(-2.12, parseMoney("- 2,12"));
|
1256
|
+
});
|
1257
|
+
|
1258
|
+
it('"$2,12" should be parsed as 2.12 (with a dollar sign)', function(){
|
1259
|
+
assert.equal(2.12, parseMoney("$2,12"));
|
1260
|
+
});
|
1261
|
+
|
1262
|
+
it('"€2,12" should be parsed as 2.12 (with a euro sign)', function(){
|
1263
|
+
assert.equal(2.12, parseMoney("€2,12"));
|
1264
|
+
});
|
1265
|
+
|
1266
|
+
it('"£2,12" should be parsed as 2.12 (with a pound sign)', function(){
|
1267
|
+
assert.equal(2.12, parseMoney("£2,12"));
|
1268
|
+
});
|
1269
|
+
|
1270
|
+
it('"₤2,12" should be parsed as 2.12 (with a pound sign)', function(){
|
1271
|
+
assert.equal(2.12, parseMoney("₤2,12"));
|
1272
|
+
});
|
1273
|
+
|
1274
|
+
it('"" should be parsed as null ', function(){
|
1275
|
+
assert.equal(null, parseMoney(""));
|
1276
|
+
});
|
1277
|
+
|
1278
|
+
it('"$" should be parsed as null (with a dollar sign)', function(){
|
1279
|
+
assert.equal(null, parseMoney("$"));
|
1280
|
+
});
|
1281
|
+
|
1282
|
+
it('"€" should be parsed as null (with a euro sign)', function(){
|
1283
|
+
assert.equal(null, parseMoney("€"));
|
1284
|
+
});
|
1285
|
+
|
1286
|
+
it('"£" should be parsed as null (with a pound sign)', function(){
|
1287
|
+
assert.equal(null, parseMoney("£"));
|
1288
|
+
});
|
1289
|
+
|
1290
|
+
it('"₤" should be parsed as null (with a pound sign)', function(){
|
1291
|
+
assert.equal(null, parseMoney("₤"));
|
1292
|
+
});
|
1293
|
+
|
1294
|
+
it('"1" should be parsed as 1.0 ', function(){
|
1295
|
+
assert.equal(1.0, parseMoney("1"));
|
1296
|
+
});
|
1297
|
+
|
1298
|
+
it('" - 1" should be parsed as -1.0 (negative amount)', function(){
|
1299
|
+
assert.equal(-1.0, parseMoney(" - 1"));
|
1300
|
+
});
|
1301
|
+
|
1302
|
+
it('"$1" should be parsed as 1.0 (with a dollar sign)', function(){
|
1303
|
+
assert.equal(1.0, parseMoney("$1"));
|
1304
|
+
});
|
1305
|
+
|
1306
|
+
it('"€1" should be parsed as 1.0 (with a euro sign)', function(){
|
1307
|
+
assert.equal(1.0, parseMoney("€1"));
|
1308
|
+
});
|
1309
|
+
|
1310
|
+
it('"£1" should be parsed as 1.0 (with a pound sign)', function(){
|
1311
|
+
assert.equal(1.0, parseMoney("£1"));
|
1312
|
+
});
|
1313
|
+
|
1314
|
+
it('"₤1" should be parsed as 1.0 (with a pound sign)', function(){
|
1315
|
+
assert.equal(1.0, parseMoney("₤1"));
|
1316
|
+
});
|
1317
|
+
|
1318
|
+
it('" " should be parsed as null ', function(){
|
1319
|
+
assert.equal(null, parseMoney(" "));
|
1320
|
+
});
|
1321
|
+
|
1322
|
+
it('"$ " should be parsed as null (with a dollar sign)', function(){
|
1323
|
+
assert.equal(null, parseMoney("$ "));
|
1324
|
+
});
|
1325
|
+
|
1326
|
+
it('"€ " should be parsed as null (with a euro sign)', function(){
|
1327
|
+
assert.equal(null, parseMoney("€ "));
|
1328
|
+
});
|
1329
|
+
|
1330
|
+
it('"£ " should be parsed as null (with a pound sign)', function(){
|
1331
|
+
assert.equal(null, parseMoney("£ "));
|
1332
|
+
});
|
1333
|
+
|
1334
|
+
it('"₤ " should be parsed as null (with a pound sign)', function(){
|
1335
|
+
assert.equal(null, parseMoney("₤ "));
|
1336
|
+
});
|
1337
|
+
|
1338
|
+
it('"hello" should be parsed as null ', function(){
|
1339
|
+
assert.equal(null, parseMoney("hello"));
|
1340
|
+
});
|
1341
|
+
|
1342
|
+
it('"$hello" should be parsed as null (with a dollar sign)', function(){
|
1343
|
+
assert.equal(null, parseMoney("$hello"));
|
1344
|
+
});
|
1345
|
+
|
1346
|
+
it('"€hello" should be parsed as null (with a euro sign)', function(){
|
1347
|
+
assert.equal(null, parseMoney("€hello"));
|
1348
|
+
});
|
1349
|
+
|
1350
|
+
it('"£hello" should be parsed as null (with a pound sign)', function(){
|
1351
|
+
assert.equal(null, parseMoney("£hello"));
|
1352
|
+
});
|
1353
|
+
|
1354
|
+
it('"₤hello" should be parsed as null (with a pound sign)', function(){
|
1355
|
+
assert.equal(null, parseMoney("₤hello"));
|
1356
|
+
});
|
1357
|
+
})
|