We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5f879b1 commit bd368a8Copy full SHA for bd368a8
test/parsing-test.ts
@@ -34,6 +34,19 @@ tape('functions', (test) => {
34
test.end();
35
});
36
37
+tape('commas', (test) => {
38
+ test.equal(str('1,1'), '11');
39
+ test.equal(str('1,1 + 2,2'), '11 + 22');
40
+ test.equal(str('1,000 + 2,000'), '1000 + 2000');
41
+ test.equal(str('1,'), '1'); // Trailing comma
42
+ // test.equal(str(',1'), '1'); // Leading comma TODO: failing
43
+ test.equal(str('1,2,3'), '123'); // Multiple commas
44
+ test.equal(str('1,234,567.89'), '1234567.89'); // Multiple commas with a decimal point
45
+ test.equal(str('1,,2'), '12'); // Multiple consecutive commas
46
+ test.equal(str('1,2,'), '12'); // Multiple commas with trailing
47
+ test.end();
48
+});
49
+
50
tape('strings', (test) => {
51
test.equal(str('"A" + "B"'), '"A" + "B"');
52
test.equal(str('"A"_"B"'), '"A"_"B"');
0 commit comments