|
|
@@ -1212,10 +1212,14 @@
|
|
1212
|
1212
|
this.assertEqual(value.type, CellValue.TYPE_STRING);
|
|
1213
|
1213
|
this.assertEqual(value.formattedValue, 'some text');
|
|
1214
|
1214
|
this.assertEqual(value.value, 'some text');
|
|
1215
|
|
- value = CellValue.fromCellString("'123");
|
|
|
1215
|
+ value = CellValue.fromCellString("'0123");
|
|
1216
|
1216
|
this.assertEqual(value.type, CellValue.TYPE_STRING);
|
|
1217
|
|
- this.assertEqual(value.formattedValue, '123');
|
|
1218
|
|
- this.assertEqual(value.value, '123');
|
|
|
1217
|
+ this.assertEqual(value.formattedValue, '0123');
|
|
|
1218
|
+ this.assertEqual(value.value, '0123');
|
|
|
1219
|
+ value = CellValue.fromCellString("'=123");
|
|
|
1220
|
+ this.assertEqual(value.type, CellValue.TYPE_STRING);
|
|
|
1221
|
+ this.assertEqual(value.formattedValue, '=123');
|
|
|
1222
|
+ this.assertEqual(value.value, '=123');
|
|
1219
|
1223
|
}
|
|
1220
|
1224
|
|
|
1221
|
1225
|
test_fromCellString_formula() {
|
|
|
@@ -1574,6 +1578,7 @@
|
|
1574
|
1578
|
|
|
1575
|
1579
|
test_func_average() {
|
|
1576
|
1580
|
this._test_simple_formula('=AVERAGE(4, 6, 2, 4)', 4);
|
|
|
1581
|
+ this._test_simple_formula('=AVERAGE(4, 6, 2, "foo", 4)', 4);
|
|
1577
|
1582
|
}
|
|
1578
|
1583
|
|
|
1579
|
1584
|
test_func_ceiling() {
|
|
|
@@ -1611,6 +1616,7 @@
|
|
1611
|
1616
|
|
|
1612
|
1617
|
test_func_log() {
|
|
1613
|
1618
|
this._test_simple_formula('=LOG(1000, 10)', 3);
|
|
|
1619
|
+ this._test_simple_formula('=LOG(64, 2)', 6);
|
|
1614
|
1620
|
}
|
|
1615
|
1621
|
|
|
1616
|
1622
|
test_func_lower() {
|
|
|
@@ -1664,6 +1670,8 @@
|
|
1664
|
1670
|
|
|
1665
|
1671
|
test_func_substitute() {
|
|
1666
|
1672
|
this._test_simple_formula('=SUBSTITUTE("cat sat on the mat", "at", "ot")', 'cot sot on the mot');
|
|
|
1673
|
+ this._test_simple_formula('=SUBSTITUTE("cAt saT on the mat", "at", "ot")', 'cot sot on the mot');
|
|
|
1674
|
+ this._test_simple_formula('=SUBSTITUTE("c.*t s.*t on the m.*t", ".*t", "ot")', 'cot sot on the mot');
|
|
1667
|
1675
|
}
|
|
1668
|
1676
|
|
|
1669
|
1677
|
test_func_sum() {
|
|
|
@@ -1694,7 +1702,7 @@
|
|
1694
|
1702
|
parser;
|
|
1695
|
1703
|
|
|
1696
|
1704
|
setUp() {
|
|
1697
|
|
- this.parser = new Markdown([ ...Markdown.allBlockReaders, new SpreadsheetBlockReader() ], Markdown.allInlineReaders);
|
|
|
1705
|
+ this.parser = new Markdown([ ...Markdown.allBlockReaders, new MDSpreadsheetBlockReader() ], Markdown.allInlineReaders);
|
|
1698
|
1706
|
}
|
|
1699
|
1707
|
|
|
1700
|
1708
|
md(markdown) {
|